---
title: "Read Resource From Json"
slug: "read-resource-from-json"
tags: ["FHIR", "module", "resource", "bundle", "JSON"]
updated: 2024-04-04T15:25:26Z
published: 2024-04-04T15:25:26Z
canonical: "documentation.decisions.com/read-resource-from-json"
---
> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt
> Use this file to discover all available pages before exploring further.
# Read Resource From Json
| ## Step Details |
| --- |
| **Introduced in Version** | 4.0.0 |
| **Last Modified in Version** | 7.12.0 |
| **Location** | Integration > FHIR |
| **Prerequisite** | [Installation](https://documentation.decisions.com/docs/installing-modules-decisions) of the FHIR Module |
The **Read Resource From JSON** step uses a JSON formatted string and outputs an FHIR Resource
---
## Properties
#### Inputs
| Property | Description | Data Type |
| --- | --- | --- |
| Json FHIRData | The desired JSON string. | String |
#### Outputs
| Property | Description | Data Type |
| --- | --- | --- |
| Output | Outputs the string as a Resource Object. | --- |
---
## Example Inputs and Outputs
| Json FHIRData | Output |
| --- | --- |
| {"id":"example","resourceType":"Account","text":{"div":"
[Put rendering here]
","status":"generated"}} | List of Resource data |
| "id":"example","resourceType":"Account","text":{"div":"[Put rendering here]
","status":"generated | EXCEPTION MESSAGE |
| Null | EXCEPTION MESSAGE |
| Empty | EXCEPTION MESSAGE |
#### 
---
## Common Errors
### Invalid JSON Encountered
If the input string is not a correctly formatted JSON string, the step will cause an error. To correct this, ensure that the JSON string is properly formatted into an **FHIR Resource.**
#### Exception Message:
```csharp
Exception Stack Trace: DecisionsFramework.Design.Flow.ErrorRunningFlowStep: Error running step Read Resource From Json 1[ReadResourceFromJson] in flow [Flow 8]: Exception invoking method ReadResourceFromJson on class FHIRDeserializeSteps
---> DecisionsFramework.LoggedException: Exception invoking method ReadResourceFromJson on class FHIRDeserializeSteps
---> System.FormatException: Invalid Json encountered. Details: Unterminated string. Expected delimiter: ". Path 'id', line 1, position 12.
---> Newtonsoft.Json.JsonReaderException: Unterminated string. Expected delimiter: ". Path 'id', line 1, position 12. at Newtonsoft.Json.JsonTextReader.ReadStringIntoBuffer(Char quote
at Newtonsoft.Json.JsonTextReader.ParseValue(
at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings
at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options
at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings
at Hl7.Fhir.Utility.SerializationUtil.JObjectFromReader(JsonReader reader)
--- End of inner exception stack trace --- at Hl7.Fhir.Utility.SerializationUtil.JObjectFromReader(JsonReader reader
at Hl7.Fhir.Serialization.FhirJsonNode.Read(JsonReader reader, String rootName, FhirJsonParsingSettings settings
at Hl7.Fhir.Serialization.FhirJsonNode.Parse(String json, String rootName, FhirJsonParsingSettings settings
at Hl7.Fhir.Serialization.FhirJsonParser.Parse(String json, Type dataType
at Hl7.Fhir.Serialization.FhirJsonParser.Parse[T](String json
at Decisions.FHIR.FlowSteps.FHIRDeserializeSteps.ReadResourceFromJson(String jsonFHIRData)
--- End of inner exception stack trace --- at DecisionsFramework.Design.Flow.StepImplementations.InvokeMethodStep.Run(StepStartData data
at DecisionsFramework.Design.Flow.FlowStep.RunStepInternal(String flowTrackingID, String stepTrackingID, KeyValuePairDataStructure[] stepRunDataValues, AbstractFlowTrackingData trackingData
at DecisionsFramework.Design.Flow.FlowStep.Start(String flowTrackingID, String stepTrackingID, FlowStateData data, AbstractFlowTrackingData trackingData, RunningStepData currentStepData)
--- End of inner exception stack trace ---
```
## Related
- [JSON Serialization](/json-serialization.md)
- [JSON Deserialization](/json-deserialization.md)
- [Test Json Is Valid](/test-json-is-valid.md)
- [Get Json Schema](/get-json-schema.md)
- [Create JSON from Data](/create-json-from-data.md)