Skip to content

Fails to decode valid json #257

Closed
Closed
@JFixby

Description

@JFixby

Json

{  "type": "MethodCallResult",  "value": {    "result": {      "type": "Null"    },    "success": {      "type": "Bool",      "value": false    },    "error": {      "type": "String",      "value": "java.lang.reflect.InvocationTargetException\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat com.jfixby.scarabei.red.reflect.JavaMethodCall.invoke(JavaMethodCall.java:22)\r\n\tat com.jfixby.scarabei.red.reflect.JavaCallExecutor.executeCall(JavaCallExecutor.java:11)\r\n\tat com.jfixby.scarabei.red.reflect.CrossLanguageCallAdaptor.processCrossLanguageMethodCall(CrossLanguageCallAdaptor.java:26)\r\n\tat com.jfixby.scarabei.examples.reflect.TestMethodCall.main(TestMethodCall.java:27)\r\nCaused by: java.io.IOException: hello\r\n\tat com.jfixby.scarabei.examples.reflect.TestMethodCall.test(TestMethodCall.java:34)\r\n\t... 8 more\r\n\r\njava.io.IOException: hello\r\n\tat com.jfixby.scarabei.examples.reflect.TestMethodCall.test(TestMethodCall.java:34)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat com.jfixby.scarabei.red.reflect.JavaMethodCall.invoke(JavaMethodCall.java:22)\r\n\tat com.jfixby.scarabei.red.reflect.JavaCallExecutor.executeCall(JavaCallExecutor.java:11)\r\n\tat com.jfixby.scarabei.red.reflect.CrossLanguageCallAdaptor.processCrossLanguageMethodCall(CrossLanguageCallAdaptor.java:26)\r\n\tat com.jfixby.scarabei.examples.reflect.TestMethodCall.main(TestMethodCall.java:27)\r\n"    }  }}

Same

{
  "type": "MethodCallResult",
  "value": {
    "result": {
      "type": "Null"
    },
    "success": {
      "type": "Bool",
      "value": false
    },
    "error": {
      "type": "String",
      "value": "java.lang.reflect.InvocationTargetException\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat com.jfixby.scarabei.red.reflect.JavaMethodCall.invoke(JavaMethodCall.java:22)\r\n\tat com.jfixby.scarabei.red.reflect.JavaCallExecutor.executeCall(JavaCallExecutor.java:11)\r\n\tat com.jfixby.scarabei.red.reflect.CrossLanguageCallAdaptor.processCrossLanguageMethodCall(CrossLanguageCallAdaptor.java:26)\r\n\tat com.jfixby.scarabei.examples.reflect.TestMethodCall.main(TestMethodCall.java:27)\r\nCaused by: java.io.IOException: hello\r\n\tat com.jfixby.scarabei.examples.reflect.TestMethodCall.test(TestMethodCall.java:34)\r\n\t... 8 more\r\n\r\njava.io.IOException: hello\r\n\tat com.jfixby.scarabei.examples.reflect.TestMethodCall.test(TestMethodCall.java:34)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat com.jfixby.scarabei.red.reflect.JavaMethodCall.invoke(JavaMethodCall.java:22)\r\n\tat com.jfixby.scarabei.red.reflect.JavaCallExecutor.executeCall(JavaCallExecutor.java:11)\r\n\tat com.jfixby.scarabei.red.reflect.CrossLanguageCallAdaptor.processCrossLanguageMethodCall(CrossLanguageCallAdaptor.java:26)\r\n\tat com.jfixby.scarabei.examples.reflect.TestMethodCall.main(TestMethodCall.java:27)\r\n"
    }
  }
}

Error

Unhandled exception:
FormatException: Control character in string (at character 243)
...type": "String",      "value": "java.lang.reflect.InvocationTargetException
                                                                              ^

#0      _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1352)
dart-lang/core#252      _ChunkedJsonParser.parseString (dart:convert-patch/convert_patch.dart:1025)
dart-lang/core#253      _ChunkedJsonParser.parse (dart:convert-patch/convert_patch.dart:838)
dart-lang/core#254      _parseJson (dart:convert-patch/convert_patch.dart:20)
dart-lang/convert#4      JsonDecoder.convert (dart:convert/json.dart:494)
dart-lang/core#255      JsonCodec.decode (dart:convert/json.dart:125)

Activity

zoechi

zoechi commented on Aug 16, 2017

@zoechi

It works when the string is passed as raw string https://dartpad.dartlang.org/e574b6fcdc3f763bfd15086a8a1e713e
I don't think line breaks are valid in JSON. You would need to replace \ by \\ before decoding if r is not used.

JFixby

JFixby commented on Aug 16, 2017

@JFixby
Author

https://jsonlint.com/ says it is valid.
So it is r'''%jsonstring%' to omit the regexps. Thank you for the hint.

JFixby

JFixby commented on Aug 16, 2017

@JFixby
Author

Btw, escape chars is one more example of the norman's door coming from 1960s :)

zoechi

zoechi commented on Aug 16, 2017

@zoechi

@JFixby it's only another example where you criticise before you have a basic understanding of the issue at hand.
\n or similar are escape sequences and interpreted as its encoded meaning (newline, return, tab). If you paste it into a an input field in the browser it's just interpreted as string, if you add it to a source file, it's interpreted as code.
This is common behavior in many (probably most) programming languages.
In most other such programming languages, you would need to replace all \ by \\ to get the intended behavior (as literal string).
Dart makes this very simple by supporting the prefix r for "raw" to instruct Dart to not interpret any escape sequences (and string interpolations).

JFixby

JFixby commented on Aug 16, 2017

@JFixby
Author

@zoechi

Here is the common behavior in many programming languages. An example in Java:

public class HelloWorld
{
  public static void main(String[] args)
  {
    
      print("D:/gradle-eclipse/hello/world");//output> D:/gradle-eclipse/hello/world

      print("D:\\gradle-eclipse\\hello\\world");//output> D:\gradle-eclipse\hello\world

      //print("D:\gradle-eclipse\hello\world");// not compiling
  
      // now i want to fix the string
      
      //print("D:\\gradle-eclipse\\hello\\world".replaceAll("\",":"));// not compiling
  
      //print("D:\\gradle-eclipse\\hello\\world".replaceAll("\\\\","\\"));// crashes
    
      print("D:\\gradle-eclipse\\hello\\world".replaceAll("\\\\\\\\","\\\\"));
      // look at this nonsense, but finaly it solves the problem,
    

  }
  
  public static void print (Object o){
  System.out.println(o);
  }
}
zoechi

zoechi commented on Aug 16, 2017

@zoechi

@JFixby not sure what this is supposed to demonstrate?
Seems to confirm what I wrote.

JFixby

JFixby commented on Aug 16, 2017

@JFixby
Author

Here is another example:

public class Test {

 public static void main (final String[] args) {

  String template = "HOME=%HOME%"; // file 1 contains HOME=%HOME%
  String values = "D:\\gradle-eclipse\\hello\\world"; // file 2 contains `D:/gradle-eclipse/hello/world`

  print(template.replaceAll("%HOME%", values)); //output `HOME=D:gradle-eclipsehelloworld`

}

	public static void print (final Object o) {
		System.out.println(o);
	}

}

and Dart

void main() {
  
  
 final String template = "HOME=%HOME%"; // file 1 contains HOME=%HOME%
 final String values = "D:\gradle-eclipse\hello\world"; // file 2 contains `D:/gradle-eclipse/hello/world`

 print(template.replaceAll("%HOME%", values)); //output `HOME=D:gradle-eclipsehelloworld`
  
  
}
zoechi

zoechi commented on Aug 16, 2017

@zoechi

Or you could add an r to get the desired output https://dartpad.dartlang.org/59866c35418603ed618f078cc9ae54e3

JFixby

JFixby commented on Aug 16, 2017

@JFixby
Author

Ok, thank you.

vincevargadev

vincevargadev commented on Jun 3, 2019

@vincevargadev

The easiest way to check if your string is valid JSON is to make your browsers parse it. Even browsers can't parse what you posted. I don't think JSONLint takes \r\n\t into account while validating.

JSON.parse(`{"newLine": "here is a \n newline"}`)
VM204:1 Uncaught SyntaxError: Unexpected token 
 in JSON at position 24
    at JSON.parse (<anonymous>)
    at <anonymous>:1:6
lrhn

lrhn commented on Jun 3, 2019

@lrhn
Member

Just to pile on the design complaining: What we have here is an example of an embedded language. The language of JSON is embedded into the language of Dart('s string literals). Whenever you do that, you have to take extra care with any character which has a meaning in the embedee language.

So, while {"newline": "here is a \n newline"} is perfectly valid JSON, putting that verbatim into a Dart string literal will not produce a string containing that valid JSON. The \n is interpreted by Dart and introduces a newline character.
So, whenever you embed one language into another, and the other language will treat some characters specially, you need to use the other language's escaping mechanism to pass the intended meaning to the embedded language. In this case, the Dart literal will be either '{"newline": "here is a \\n newline"}' or even "{\"newline\": \"here is a \\n newline\"}".

Dart has one feature which makes embedding other languages easier: Raw strings. Inside a raw string, no source character has special meaning except the end-of-string marker (well, and literal newline characters are still not allowed in single-line raw strings), so you can do: r'{"newline": "here is a \n newline"}'`.

Other examples of nested languages include:

  • JavaScript inside HTML (don't have "</script>" inside your script element! In the good old days, you were recommended to always write "<\/..." when </ occurred, because that's what ended a CDATA element, but browsers found that too fragile and insisted on seeing the full </script>).
  • RegExp strings in JavaScript: RegExp("^\\s+|\\s+$"). JavaScript allows you to avoid that issue using reg-exp literals: /^\s+|\s+$/. Dart does not have that, but because of raw strings, it doesn't actually need it. (Also: RegExp strings in Java, C# (they have raw strings too, @"..."), ...).
Douvi

Douvi commented on Mar 9, 2020

@Douvi

I have a little issue of how can I solve it:

import 'dart:convert';

void main() {
 final String jsonObject = "{\"key\" : \"here a nice \"world\"\"}";

 print(json.decode(jsonObject));
}

Error:
Uncaught Error: FormatException: SyntaxError: Unexpected token w in JSON at position 23

Playground:
https://dartpad.dartlang.org/59866c35418603ed618f078cc9ae54e3

I do not see why this is wrong...

natebosch

natebosch commented on Mar 9, 2020

@natebosch
Member

@Douvi

Your dartpad link points to the wrong place...

In any case, the way to escape that string is jsonObject = "{\"key\" : \"here a nice \\\"world\\\"\"}";

The way I'd write that is jsonObject = r'{"key" : "here a nice \"world\""}';

srvstvnhl

srvstvnhl commented on Mar 31, 2021

@srvstvnhl

How do i parse this json? tried various method with jsonDecode and it is still not getting parse. It is a valid json

{ "pageNumber": 0, "pageCount": 0, "transactionId": "126cf723-1d57-4f49-8fb2-072b7c23ec1e", "entries": [ { "content": "{\"resourceType\":\"Bundle\",\"id\":\"DRiefcase_2021-03-15__ManjoorKapoor_Pres-13116\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2021-01-20T04:51:59.1497479Z\",\"profile\":[\"https:\\/\\/nrces.in\\/ndhm\\/fhir\\/r4\\/StructureDefinition\\/DocumentBundle\"],\"security\":[{\"system\":\"http:\\/\\/terminology.hl7.org\\/CodeSystem\\/v3-Confidentiality\",\"code\":\"V\",\"display\":\"veryrestricted\"}]},\"identifier\":{\"system\":\"http:\\/\\/hip.in\",\"value\":\"242590bb-b122-45d0-8eb2-883392297ee1\"},\"type\":\"document\",\"timestamp\":\"2021-03-15T16:12:43.2682813Z\",\"entry\":[{\"fullUrl\":\"Composition/DRF2021-03-15-13163\",\"resource\":{\"resourceType\":\"Composition\",\"id\":\"1\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2021-01-20T04:51:59.1497479Z\",\"profile\":[\"https:\\/\\/nrces.in\\/ndhm\\/fhir\\/r4\\/StructureDefinition\\/DiagnosticReportRecord\"]},\"language\":\"en-IN\",\"text\":{\"status\":\"generated\",\"div\":\"<divxmlns=\\\"http:\\/\\/www.w3.org\\/1999\\/xhtml\\\"><h4>NarrativewithDetails<\\/h4>\\r<p><b>id:<\\/b>1<\\/p>\\r\\t<p><b>status:<\\/b>final<\\/p>\\r\\t<p><b>category:<\\/b>Computerizedtomographyservice(Details:{http:\\/\\/snomed.info\\/sct}code'310128004'='Computerizedtomographyservice')<\\/p>\\r\\t<p><b>subject:<\\/b>ManjoorKapoor.GeneratedSummary:id:1;MedicalRecordNumber=1234(System:{https:\\/\\/healthid.ndhm.gov.in\\/});active;ManjoorKapoor;ph:8905929811(HOME);gender:male;birthDate:2001-01-01<\\/p>\\r\\t<p><b>issued:<\\/b>2020-07-09<\\/p>\\r\\t<p><b>performer:<\\/b>XYZLabPvt.Ltd.<\\/p>\\r\\t<p><b>resultInterpreter:<\\/b>ManjoorKapoor.GeneratedSummary:id:1;MedicalLicensenumber=7601003178999(System:{doctor.ndhm.gov.in})<\\/p>\\t\\t\\t\\t\\t\\t<h3>DiagnosticReportforManjoorKapoorissued9-July202014:26<\\/h3>\\t\\t\\t\\t\\t\\t<pre>code:CTofhead-neckImagingStudy:HEADandNECKCTDICOMimagingstudyConclusion:CTbrains:largetumorsphenoid\\/clivus.<\\/pre>\\t\\t\\t\\t\\t\\t<p>XYZLabPvt.Ltd.,Incsigned:ManjoorKapoorRadiologist<\\/p>\\t\\t\\t\\t\\t<\\/div>\"},\"identifier\":{\"system\":\"https:\\/\\/ndhm.in\\/phr\",\"value\":\"5d42bc8e-b26f-4b6d-835c-a18458e84957\"},\"status\":\"final\",\"type\":{\"coding\":[{\"system\":\"http:\\/\\/snomed.info\\/sct\",\"code\":\"721981007\",\"display\":\"Diagnosticstudiesreport\"}],\"text\":\"DiagnosticReport\"},\"subject\":{\"reference\":\"Patient/d08d5007-f6fd-48a6-9e47-52ffe4b95da6\"},\"date\":\"2017-05-27T11:46:09+05:30\",\"author\":[{\"reference\":\"Practitioner/ManjoorKapoor\"}],\"title\":\"DiagnosticReport\",\"section\":[{\"title\":\"Computedtomographyimagingreport\",\"code\":{\"coding\":[{\"system\":\"http:\\/\\/snomed.info\\/sct\",\"code\":\"4261000179100\",\"display\":\"Computedtomographyimagingreport\"}]},\"entry\":[{\"reference\":\"DiagnosticReport/DRF2021-03-15-13163\",\"type\":\"DiagnosticReport\"},{\"reference\":\"DocumentReference/DRF2021-03-15-13163\",\"type\":\"DocumentReference\"}]}]}},{\"fullUrl\":\"Patient/d08d5007-f6fd-48a6-9e47-52ffe4b95da6\",\"resource\":{\"resourceType\":\"Patient\",\"id\":\"1\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2021-03-15T16:12:43.2682813Z\",\"profile\":[\"https:\\/\\/nrces.in\\/ndhm\\/fhir\\/r4\\/StructureDefinition\\/Patient\"]},\"text\":{\"status\":\"generated\",\"div\":\"<divxmlns=\\\"http:\\/\\/www.w3.org\\/1999\\/xhtml\\\">ManjoorKapoor<\\/div>\"},\"identifier\":[{\"type\":{\"coding\":[{\"system\":\"http:\\/\\/terminology.hl7.org\\/CodeSystem\\/v2-0203\",\"code\":\"MR\",\"display\":\"Medicalrecordnumber\"}]},\"system\":\"https:\\/\\/healthid.ndhm.gov.in\",\"value\":\"22-7225-4829-5255\"}],\"name\":[{\"text\":\"ManjoorKapoor\"}],\"telecom\":[{\"system\":\"phone\",\"value\":\"8905929811\",\"use\":\"home\"}],\"gender\":\"male\",\"birthDate\":\"2001-01-01\"}},{\"fullUrl\":\"Practitioner/ManjoorKapoor\",\"resource\":{\"resourceType\":\"Practitioner\",\"id\":\"1\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2021-03-15T16:12:43.2682813Z\",\"profile\":[\"https:\\/\\/nrces.in\\/ndhm\\/fhir\\/r4\\/StructureDefinition\\/Practitioner\"]},\"text\":{\"status\":\"generated\",\"div\":\"<divxmlns=\\\"http:\\/\\/www.w3.org\\/1999\\/xhtml\\\">ManjoorKapoor<\\/div>\"},\"identifier\":[{\"type\":{\"coding\":[{\"system\":\"http:\\/\\/terminology.hl7.org\\/CodeSystem\\/v2-0203\",\"code\":\"MD\",\"display\":\"MedicalLicensenumber\"}]},\"system\":\"https:\\/\\/doctor.ndhm.gov.in\",\"value\":\"21-1521-3828-3227\"}],\"name\":[{\"text\":\"ManjoorKapoor\"}]}},{\"fullUrl\":\"Organization\\/1\",\"resource\":{\"resourceType\":\"Organization\",\"id\":\"1\",\"meta\":{\"profile\":[\"https:\\/\\/nrces.in\\/ndhm\\/fhir\\/r4\\/StructureDefinition\\/Organization\"]},\"text\":{\"status\":\"generated\",\"div\":\"<divxmlns=\\\"http:\\/\\/www.w3.org\\/1999\\/xhtml\\\">XYZLabPvt.Ltd.ph:8905929811,email:<ahref=\\\"mailto:contact@labs.xyz.org\\\">contact@labs.xyz.org<\\/a><\\/div>\"},\"identifier\":[{\"type\":{\"coding\":[{\"system\":\"http:\\/\\/terminology.hl7.org\\/CodeSystem\\/v2-0203\",\"code\":\"PRN\",\"display\":\"Providernumber\"}]},\"system\":\"https:\\/\\/facility.ndhm.gov.in\\/\",\"value\":\"4567878\"}],\"name\":\"XYZLabPvt.Ltd.\",\"telecom\":[{\"system\":\"phone\",\"value\":\"8905929811\",\"use\":\"work\"},{\"system\":\"email\",\"value\":\"contact@labs.xyz.org\",\"use\":\"work\"}]}},{\"fullUrl\":\"DiagnosticReport/DRF2021-03-15-13163\",\"resource\":{\"resourceType\":\"DiagnosticReport\",\"id\":\"1\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2021-01-20T04:51:59.1497479Z\",\"profile\":[\"https:\\/\\/nrces.in\\/ndhm\\/fhir\\/r4\\/StructureDefinition\\/DiagnosticReportImaging\"]},\"text\":{\"status\":\"generated\",\"div\":\"<divxmlns=\\\"http:\\/\\/www.w3.org\\/1999\\/xhtml\\\">\\t\\t\\t\\t\\t\\t<h3>DiagnosticReportforManjoorKapoorissued9-July202014:26<\\/h3>\\t\\t\\t\\t\\t\\t<pre>code:CTofhead-neckImagingStudy:HEADandNECKCTDICOMimagingstudyConclusion:CTbrains:largetumorsphenoid\\/clivus.<\\/pre>\\t\\t\\t\\t\\t\\t<p>XYZLabPvt.Ltd.,Incsigned:ManjoorKapoorRadiologist<\\/p>\\t\\t\\t\\t\\t<\\/div>\"},\"identifier\":[{\"system\":\"https:\\/\\/xyz.com\\/lab\\/reports\",\"value\":\"5234342\"}],\"basedOn\":[{\"reference\":\"ServiceRequest/DRF2021-03-15-13163\"}],\"status\":\"final\",\"category\":[{\"coding\":[{\"system\":\"http:\\/\\/snomed.info\\/sct\",\"code\":\"310128004\",\"display\":\"Computerizedtomographyservice\"}]}],\"code\":{\"coding\":[{\"system\":\"http:\\/\\/loinc.org\",\"code\":\"82692-5\",\"display\":\"CTHeadandNeckWOcontrast\"}],\"text\":\"CTHeadandNeckWOcontrast\"},\"subject\":{\"reference\":\"Patient/d08d5007-f6fd-48a6-9e47-52ffe4b95da6\",\"display\":\"ManjoorKapoor\"},\"issued\":\"2021-01-20T04:51:59.1497479Z\",\"performer\":[{\"reference\":\"Organization\\/1\",\"display\":\"XYZLabPvt.Ltd.\"}],\"resultsInterpreter\":[{\"reference\":\"Practitioner/ManjoorKapoor\",\"display\":\"ManjoorKapoor\"}],\"imagingStudy\":[{\"reference\":\"ImagingStudy\\/1\",\"display\":\"HEADandNECKCTDICOMimagingstudy\"}],\"media\":[{\"link\":{\"reference\":\"Media\\/1\"}}],\"conclusion\":\"CTbrains:largetumorsphenoid\\/clivus.\",\"conclusionCode\":[{\"coding\":[{\"system\":\"http:\\/\\/snomed.info\\/sct\",\"code\":\"188340000\",\"display\":\"Malignanttumorofcraniopharyngealduct\"}]}],\"presentedForm\":[{\"contentType\":\"application\\/pdf\",\"language\":\"en-IN\",\"data\":\"JVBERi0xLjcKCjQgMCBvYmoKPDwKL0ZpbHRlciAvRmxhdGVEZWNvZGUKL0xlbmd0aCA4MzUKPj4Kc3RyZWFtCnicdVZLrhQxDNz3KWaN1FYcO79jsOIASMDiPSS4/wLHnyTNg1l5ynHFLjtJJ2glye+VIKWncX/0dUYYOSXm19f369eFH4KWsVyZGJrEJHwRF0goVprhN+Ly3Jky1CF2fr1fSNCq5XDgbwfeKjCp9fbgOfEf15dPr59X+n+Ov7//w/t+HTWUHlJgtmpgLHWoqUUwzHh9vQSttlAqLbFwFIeG+W6M2Bo7zFiEZn8aZI/NYTVoFFAb1gzV0mMJiBwlT5Cgd4dck5uB6xOasb0DmsT9UFVQFftA7z4gDxV6byNYC+xIaKRYulMXzCl3hQMhW+8eWghc6xijH6qNLBsI1g5xBctVsUcbBC6oO+2GCVZJlo6jrxtbTfdwh6UpvNc65+xB/Xv/qTefDJ6riD5w1dqS0RboaYE096qvu9oGS8BRbLGohUvByEFk5dUB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2VzIDIgMCBSCi9UeXBlIC9DYXRhbG9nCj4+CmVuZG9iago2IDAgb2JqCjw8Ci9BdXRob3IgKERyaWVmY2FzZSkKL0NyZWF0aW9uRGF0ZSAoRDoyMDE5MDQxNTE3MDcxMCswNSczMCcpCi9Nb2REYXRlIChEOjIwMTkwNDE1MTcwNzEwKzA1JzMwJykKL1Byb2R1Y2VyIChNaWNyb3NvZnQ6IFByaW50IFRvIFBERikKL1RpdGxlICgxLmRvYykKPj4KZW5kb2JqCnhyZWYKMCA3DQowMDAwMDAwMDAwIDY1NTM1IGYNCjAwMDAwMDExNzMgMDAwMDAgbg0KMDAwMDAwMTExNCAwMDAwMCBuDQowMDAwMDAwOTM3IDAwMDAwIG4NCjAwMDAwMDAwMDkgMDAwMDAgbg0KMDAwMDAwMDkxNiAwMDAwMCBuDQowMDAwMDAxMjIyIDAwMDAwIG4NCnRyYWlsZXIKPDwKL0luZm8gNiAwIFIKL1Jvb3QgMSAwIFIKL1NpemUgNwo+PgpzdGFydHhyZWYKMTM5MAolJUVPRgo=\",\"title\":\"DiagnosticReport\"}]}},{\"fullUrl\":\"DocumentReference/DRF2021-03-15-13163\",\"resource\":{\"resourceType\":\"DocumentReference\",\"id\":\"1\",\"meta\":{\"profile\":[\"https:\\/\\/nrces.in\\/ndhm\\/fhir\\/r4\\/StructureDefinition\\/DocumentReference\"]},\"text\":{\"status\":\"generated\",\"div\":\"<divxmlns=\\\"http:\\/\\/www.w3.org\\/1999\\/xhtml\\\"><p><b>GeneratedNarrative<\\/b><\\/p><p><b>id<\\/b>:1<\\/p><p><b>meta<\\/b>:<\\/p><p><b>status<\\/b>:current<\\/p><p><b>docStatus<\\/b>:final<\\/p><p><b>type<\\/b>:<spantitle=\\\"Codes:{http:\\/\\/snomed.info\\/sct4241000179101}\\\">Laboratoryreport<\\/span><\\/p><p><b>subject<\\/b>:<ahref=\\\"#Patient_1\\\">Seeabove(Patient/d08d5007-f6fd-48a6-9e47-52ffe4b95da6)<\\/a><\\/p><h3>Contents<\\/h3><tableclass=\\\"grid\\\"><tr><td>-<\\/td><td><b>Attachment<\\/b><\\/td><\\/tr><tr><td>*<\\/td><td><\\/td><\\/tr><\\/table><\\/div>\"},\"status\":\"current\",\"docStatus\":\"final\",\"type\":{\"coding\":[{\"system\":\"http:\\/\\/snomed.info\\/sct\",\"code\":\"4241000179101\",\"display\":\"Laboratoryreport\"}],\"text\":\"Laboratoryreport\"},\"subject\":{\"reference\":\"Patient/d08d5007-f6fd-48a6-9e47-52ffe4b95da6\"},\"content\":[{\"attachment\":{\"contentType\":\"application\\/pdf\",\"language\":\"en-IN\",\"data\":\"JVBERi0xLjcKCjQgMCBvYmoKPDwKL0ZpbHRlciAvRmxhdGVEZWNvZGUKL0xlbmd0aCA4MzUKPj4Kc3RyZWFtCnicdVZLrhQxDNz3KWaN1FYcO79jsOIASMDiPSS4/wLHnyTNg1l5ynHFLjtJJ2glye+VIKWncX/0dUYYOSXm19f369eFH4KWsVyZGJrEJHwRF0goVprhN+Ly3Jky1CF2fr1fSNCq5XDgbwfeKjCp9fbgOfEf15dPr59X+n+Ov7//w/t+HTWUHlJgtmpgLHWoqUUwzHh9vQSttlAqLbFwFIeG+W6M2Bo7zFiEZn8aZI/NYTVoFFAb1gzV0mMJiBwlT5Cgd4dck5uB6xOasb0DmsT9UFVQFftA7z4gDxV6byNYC+xIaKRYulMXzCl3hQMhW+8eWghc6xijH6qNLBsI1g5xBctVsUcbBC6oO+2GCVZJlo6jrxtbTfdwh6UpvNc65+xB/Xv/qTefDJ6riD5w1dqS0RboaYE096qvu9oGS8BRbLGohUvByEFk5dUBLV2OUY851b6O3Tjg4VaH7tt1qH2BGKYdN2Mo+4Au/O0BI0mfu/CRzkwRZY0cEWX+NP/paIDF8p4O7R7pvjzL4QlLaUU7PhOn6vwCa5k5RNGKyDyZzB6T0mI1wDnnEEUbBR6sDfH25KgAvcVk44ABZzukBvcU9BRLlIds5rUuXsoKrH3QNOvO54TlBO1WPTxjTcmkd6nEb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IChNaWNyb3NvZnQ6IFByaW50IFRvIFBERikKL1RpdGxlICgxLmRvYykKPj4KZW5kb2JqCnhyZWYKMCA3DQowMDAwMDAwMDAwIDY1NTM1IGYNCjAwMDAwMDExNzMgMDAwMDAgbg0KMDAwMDAwMTExNCAwMDAwMCBuDQowMDAwMDAwOTM3IDAwMDAwIG4NCjAwMDAwMDAwMDkgMDAwMDAgbg0KMDAwMDAwMDkxNiAwMDAwMCBuDQowMDAwMDAxMjIyIDAwMDAwIG4NCnRyYWlsZXIKPDwKL0luZm8gNiAwIFIKL1Jvb3QgMSAwIFIKL1NpemUgNwo+PgpzdGFydHhyZWYKMTM5MAolJUVPRgo=\",\"title\":\"Laboratoryreport\",\"creation\":\"2021-03-15T16:12:43.2682813Z\"}}]}}]}", "media": "application/fhir+json", "checksum": null, "careContextReference": "55c4573d-d9da-49c3-85f9-261c5c317b4d", "link": null } ], "keyMaterial": { "cryptoAlg": "ECDH", "curve": "Curve25519", "dhPublicKey": { "expiry": "2021-03-15T16:12:43.4077066Z", "parameters": null, "keyValue": "MIIBMTCB6gYHKoZIzj0CATCB3gIBATArBgcqhkjOPQEBAiB/////////////////////////////////////////7TBEBCAqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqYSRShRAQge0Je0Je0Je0Je0Je0Je0Je0Je0Je0Je0JgtenHcQyGQEQQQqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq0kWiCuGaG4oIa04B7dLHdI0UySPU1+bXxhsinpxaJ+ztPZAiAQAAAAAAAAAAAAAAAAAAAAFN753qL3nNZYEmMaXPXT7QIBCANCAAQ+Dp+eEaXGdpD8t5MR1iOH4qQiLduMCkBFSoKA38WpihtrcUyi36bsHBmRp5E0yb1H2COBJDc3gn4IBpj1BGaK" }, "nonce": "DLNDgPKrAr3XGthN4Bk9AMfzGfLlgeHjj+uJHZLSLSg=" } }

natebosch

natebosch commented on Mar 31, 2021

@natebosch
Member

@srvstvnhl - that JSON parses with jsonDecode without error. I tested by pasting that content into a file, then reading that file in with dart:io and passing it to jsonDecode.

If you want to paste it into a Dart source file it looks like it work to us r''' style quoting.

final jsonContent = r'''{ "pageNumber": 0, "pageCount": 0, "transactionId": "126cf723-1d57-4f49-8fb2-072b7c23ec1e", "entries": [ { "content": "{\"resourceType\":\"Bundle\",\"id\":\"DRiefcase_2021-03-15__ManjoorKapoor_Pres-13116\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2021-01-20T04:51:59.1497479Z\",\"profile\":[\"https:\\/\\/nrces.in\\/ndhm\\/fhir\\/r4\\/StructureDefinition\\/DocumentBundle\"],\"security\":[{\"system\":\"http:\\/\\/terminology.hl7.org\\/CodeSystem\\/v3-Confidentiality\",\"code\":\"V\",\"display\":\"veryrestricted\"}]},\"identifier\":{\"system\":\"http:\\/\\/hip.in\",\"value\":\"242590bb-b122-45d0-8eb2-883392297ee1\"},\"type\":\"document\",\"timestamp\":\"2021-03-15T16:12:43.2682813Z\",\"entry\":[{\"fullUrl\":\"Composition/DRF2021-03-15-13163\",\"resource\":{\"resourceType\":\"Composition\",\"id\":\"1\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2021-01-20T04:51:59.1497479Z\",\"profile\":[\"https:\\/\\/nrces.in\\/ndhm\\/fhir\\/r4\\/StructureDefinition\\/DiagnosticReportRecord\"]},\"language\":\"en-IN\",\"text\":{\"status\":\"generated\",\"div\":\"<divxmlns=\\\"http:\\/\\/www.w3.org\\/1999\\/xhtml\\\"><h4>NarrativewithDetails<\\/h4>\\r<p><b>id:<\\/b>1<\\/p>\\r\\t<p><b>status:<\\/b>final<\\/p>\\r\\t<p><b>category:<\\/b>Computerizedtomographyservice(Details:{http:\\/\\/snomed.info\\/sct}code'310128004'='Computerizedtomographyservice')<\\/p>\\r\\t<p><b>subject:<\\/b>ManjoorKapoor.GeneratedSummary:id:1;MedicalRecordNumber=1234(System:{https:\\/\\/healthid.ndhm.gov.in\\/});active;ManjoorKapoor;ph:8905929811(HOME);gender:male;birthDate:2001-01-01<\\/p>\\r\\t<p><b>issued:<\\/b>2020-07-09<\\/p>\\r\\t<p><b>performer:<\\/b>XYZLabPvt.Ltd.<\\/p>\\r\\t<p><b>resultInterpreter:<\\/b>ManjoorKapoor.GeneratedSummary:id:1;MedicalLicensenumber=7601003178999(System:{doctor.ndhm.gov.in})<\\/p>\\t\\t\\t\\t\\t\\t<h3>DiagnosticReportforManjoorKapoorissued9-July202014:26<\\/h3>\\t\\t\\t\\t\\t\\t<pre>code:CTofhead-neckImagingStudy:HEADandNECKCTDICOMimagingstudyConclusion:CTbrains:largetumorsphenoid\\/clivus.<\\/pre>\\t\\t\\t\\t\\t\\t<p>XYZLabPvt.Ltd.,Incsigned:ManjoorKapoorRadiologist<\\/p>\\t\\t\\t\\t\\t<\\/div>\"},\"identifier\":{\"system\":\"https:\\/\\/ndhm.in\\/phr\",\"value\":\"5d42bc8e-b26f-4b6d-835c-a18458e84957\"},\"status\":\"final\",\"type\":{\"coding\":[{\"system\":\"http:\\/\\/snomed.info\\/sct\",\"code\":\"721981007\",\"display\":\"Diagnosticstudiesreport\"}],\"text\":\"DiagnosticReport\"},\"subject\":{\"reference\":\"Patient/d08d5007-f6fd-48a6-9e47-52ffe4b95da6\"},\"date\":\"2017-05-27T11:46:09+05:30\",\"author\":[{\"reference\":\"Practitioner/ManjoorKapoor\"}],\"title\":\"DiagnosticReport\",\"section\":[{\"title\":\"Computedtomographyimagingreport\",\"code\":{\"coding\":[{\"system\":\"http:\\/\\/snomed.info\\/sct\",\"code\":\"4261000179100\",\"display\":\"Computedtomographyimagingreport\"}]},\"entry\":[{\"reference\":\"DiagnosticReport/DRF2021-03-15-13163\",\"type\":\"DiagnosticReport\"},{\"reference\":\"DocumentReference/DRF2021-03-15-13163\",\"type\":\"DocumentReference\"}]}]}},{\"fullUrl\":\"Patient/d08d5007-f6fd-48a6-9e47-52ffe4b95da6\",\"resource\":{\"resourceType\":\"Patient\",\"id\":\"1\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2021-03-15T16:12:43.2682813Z\",\"profile\":[\"https:\\/\\/nrces.in\\/ndhm\\/fhir\\/r4\\/StructureDefinition\\/Patient\"]},\"text\":{\"status\":\"generated\",\"div\":\"<divxmlns=\\\"http:\\/\\/www.w3.org\\/1999\\/xhtml\\\">ManjoorKapoor<\\/div>\"},\"identifier\":[{\"type\":{\"coding\":[{\"system\":\"http:\\/\\/terminology.hl7.org\\/CodeSystem\\/v2-0203\",\"code\":\"MR\",\"display\":\"Medicalrecordnumber\"}]},\"system\":\"https:\\/\\/healthid.ndhm.gov.in\",\"value\":\"22-7225-4829-5255\"}],\"name\":[{\"text\":\"ManjoorKapoor\"}],\"telecom\":[{\"system\":\"phone\",\"value\":\"8905929811\",\"use\":\"home\"}],\"gender\":\"male\",\"birthDate\":\"2001-01-01\"}},{\"fullUrl\":\"Practitioner/ManjoorKapoor\",\"resource\":{\"resourceType\":\"Practitioner\",\"id\":\"1\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2021-03-15T16:12:43.2682813Z\",\"profile\":[\"https:\\/\\/nrces.in\\/ndhm\\/fhir\\/r4\\/StructureDefinition\\/Practitioner\"]},\"text\":{\"status\":\"generated\",\"div\":\"<divxmlns=\\\"http:\\/\\/www.w3.org\\/1999\\/xhtml\\\">ManjoorKapoor<\\/div>\"},\"identifier\":[{\"type\":{\"coding\":[{\"system\":\"http:\\/\\/terminology.hl7.org\\/CodeSystem\\/v2-0203\",\"code\":\"MD\",\"display\":\"MedicalLicensenumber\"}]},\"system\":\"https:\\/\\/doctor.ndhm.gov.in\",\"value\":\"21-1521-3828-3227\"}],\"name\":[{\"text\":\"ManjoorKapoor\"}]}},{\"fullUrl\":\"Organization\\/1\",\"resource\":{\"resourceType\":\"Organization\",\"id\":\"1\",\"meta\":{\"profile\":[\"https:\\/\\/nrces.in\\/ndhm\\/fhir\\/r4\\/StructureDefinition\\/Organization\"]},\"text\":{\"status\":\"generated\",\"div\":\"<divxmlns=\\\"http:\\/\\/www.w3.org\\/1999\\/xhtml\\\">XYZLabPvt.Ltd.ph:8905929811,email:<ahref=\\\"mailto:contact@labs.xyz.org\\\">contact@labs.xyz.org<\\/a><\\/div>\"},\"identifier\":[{\"type\":{\"coding\":[{\"system\":\"http:\\/\\/terminology.hl7.org\\/CodeSystem\\/v2-0203\",\"code\":\"PRN\",\"display\":\"Providernumber\"}]},\"system\":\"https:\\/\\/facility.ndhm.gov.in\\/\",\"value\":\"4567878\"}],\"name\":\"XYZLabPvt.Ltd.\",\"telecom\":[{\"system\":\"phone\",\"value\":\"8905929811\",\"use\":\"work\"},{\"system\":\"email\",\"value\":\"contact@labs.xyz.org\",\"use\":\"work\"}]}},{\"fullUrl\":\"DiagnosticReport/DRF2021-03-15-13163\",\"resource\":{\"resourceType\":\"DiagnosticReport\",\"id\":\"1\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2021-01-20T04:51:59.1497479Z\",\"profile\":[\"https:\\/\\/nrces.in\\/ndhm\\/fhir\\/r4\\/StructureDefinition\\/DiagnosticReportImaging\"]},\"text\":{\"status\":\"generated\",\"div\":\"<divxmlns=\\\"http:\\/\\/www.w3.org\\/1999\\/xhtml\\\">\\t\\t\\t\\t\\t\\t<h3>DiagnosticReportforManjoorKapoorissued9-July202014:26<\\/h3>\\t\\t\\t\\t\\t\\t<pre>code:CTofhead-neckImagingStudy:HEADandNECKCTDICOMimagingstudyConclusion:CTbrains:largetumorsphenoid\\/clivus.<\\/pre>\\t\\t\\t\\t\\t\\t<p>XYZLabPvt.Ltd.,Incsigned:ManjoorKapoorRadiologist<\\/p>\\t\\t\\t\\t\\t<\\/div>\"},\"identifier\":[{\"system\":\"https:\\/\\/xyz.com\\/lab\\/reports\",\"value\":\"5234342\"}],\"basedOn\":[{\"reference\":\"ServiceRequest/DRF2021-03-15-13163\"}],\"status\":\"final\",\"category\":[{\"coding\":[{\"system\":\"http:\\/\\/snomed.info\\/sct\",\"code\":\"310128004\",\"display\":\"Computerizedtomographyservice\"}]}],\"code\":{\"coding\":[{\"system\":\"http:\\/\\/loinc.org\",\"code\":\"82692-5\",\"display\":\"CTHeadandNeckWOcontrast\"}],\"text\":\"CTHeadandNeckWOcontrast\"},\"subject\":{\"reference\":\"Patient/d08d5007-f6fd-48a6-9e47-52ffe4b95da6\",\"display\":\"ManjoorKapoor\"},\"issued\":\"2021-01-20T04:51:59.1497479Z\",\"performer\":[{\"reference\":\"Organization\\/1\",\"display\":\"XYZLabPvt.Ltd.\"}],\"resultsInterpreter\":[{\"reference\":\"Practitioner/ManjoorKapoor\",\"display\":\"ManjoorKapoor\"}],\"imagingStudy\":[{\"reference\":\"ImagingStudy\\/1\",\"display\":\"HEADandNECKCTDICOMimagingstudy\"}],\"media\":[{\"link\":{\"reference\":\"Media\\/1\"}}],\"conclusion\":\"CTbrains:largetumorsphenoid\\/clivus.\",\"conclusionCode\":[{\"coding\":[{\"system\":\"http:\\/\\/snomed.info\\/sct\",\"code\":\"188340000\",\"display\":\"Malignanttumorofcraniopharyngealduct\"}]}],\"presentedForm\":[{\"contentType\":\"application\\/pdf\",\"language\":\"en-IN\",\"data\":\"JVBERi0xLjcKCjQgMCBvYmoKPDwKL0ZpbHRlciAvRmxhdGVEZWNvZGUKL0xlbmd0aCA4MzUKPj4Kc3RyZWFtCnicdVZLrhQxDNz3KWaN1FYcO79jsOIASMDiPSS4/wLHnyTNg1l5ynHFLjtJJ2glye+VIKWncX/0dUYYOSXm19f369eFH4KWsVyZGJrEJHwRF0goVprhN+Ly3Jky1CF2fr1fSNCq5XDgbwfeKjCp9fbgOfEf15dPr59X+n+Ov7//w/t+HTWUHlJgtmpgLHWoqUUwzHh9vQSttlAqLbFwFIeG+W6M2Bo7zFiEZn8aZI/NYTVoFFAb1gzV0mMJiBwlT5Cgd4dck5uB6xOasb0DmsT9UFVQFftA7z4gDxV6byNYC+xIaKRYulMXzCl3hQMhW+8eWghc6xijH6qNLBsI1g5xBctVsUcbBC6oO+2GCVZJlo6jrxtb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RzIFsgMyAwIFIgXQovVHlwZSAvUGFnZXMKPj4KZW5kb2JqCjEgMCBvYmoKPDwKL1BhZ2VzIDIgMCBSCi9UeXBlIC9DYXRhbG9nCj4+CmVuZG9iago2IDAgb2JqCjw8Ci9BdXRob3IgKERyaWVmY2FzZSkKL0NyZWF0aW9uRGF0ZSAoRDoyMDE5MDQxNTE3MDcxMCswNSczMCcpCi9Nb2REYXRlIChEOjIwMTkwNDE1MTcwNzEwKzA1JzMwJykKL1Byb2R1Y2VyIChNaWNyb3NvZnQ6IFByaW50IFRvIFBERikKL1RpdGxlICgxLmRvYykKPj4KZW5kb2JqCnhyZWYKMCA3DQowMDAwMDAwMDAwIDY1NTM1IGYNCjAwMDAwMDExNzMgMDAwMDAgbg0KMDAwMDAwMTExNCAwMDAwMCBuDQowMDAwMDAwOTM3IDAwMDAwIG4NCjAwMDAwMDAwMDkgMDAwMDAgbg0KMDAwMDAwMDkxNiAwMDAwMCBuDQowMDAwMDAxMjIyIDAwMDAwIG4NCnRyYWlsZXIKPDwKL0luZm8gNiAwIFIKL1Jvb3QgMSAwIFIKL1NpemUgNwo+PgpzdGFydHhyZWYKMTM5MAolJUVPRgo=\",\"title\":\"DiagnosticReport\"}]}},{\"fullUrl\":\"DocumentReference/DRF2021-03-15-13163\",\"resource\":{\"resourceType\":\"DocumentReference\",\"id\":\"1\",\"meta\":{\"profile\":[\"https:\\/\\/nrces.in\\/ndhm\\/fhir\\/r4\\/StructureDefinition\\/DocumentReference\"]},\"text\":{\"status\":\"generated\",\"div\":\"<divxmlns=\\\"http:\\/\\/www.w3.org\\/1999\\/xhtml\\\"><p><b>GeneratedNarrative<\\/b><\\/p><p><b>id<\\/b>:1<\\/p><p><b>meta<\\/b>:<\\/p><p><b>status<\\/b>:current<\\/p><p><b>docStatus<\\/b>:final<\\/p><p><b>type<\\/b>:<spantitle=\\\"Codes:{http:\\/\\/snomed.info\\/sct4241000179101}\\\">Laboratoryreport<\\/span><\\/p><p><b>subject<\\/b>:<ahref=\\\"#Patient_1\\\">Seeabove(Patient/d08d5007-f6fd-48a6-9e47-52ffe4b95da6)<\\/a><\\/p><h3>Contents<\\/h3><tableclass=\\\"grid\\\"><tr><td>-<\\/td><td><b>Attachment<\\/b><\\/td><\\/tr><tr><td>*<\\/td><td><\\/td><\\/tr><\\/table><\\/div>\"},\"status\":\"current\",\"docStatus\":\"final\",\"type\":{\"coding\":[{\"system\":\"http:\\/\\/snomed.info\\/sct\",\"code\":\"4241000179101\",\"display\":\"Laboratoryreport\"}],\"text\":\"Laboratoryreport\"},\"subject\":{\"reference\":\"Patient/d08d5007-f6fd-48a6-9e47-52ffe4b95da6\"},\"content\":[{\"attachment\":{\"contentType\":\"application\\/pdf\",\"language\":\"en-IN\",\"data\":\"JVBERi0xLjcKCjQgMCBvYmoKPDwKL0ZpbHRlciAvRmxhdGVEZWNvZGUKL0xlbmd0aCA4MzUKPj4Kc3RyZWFtCnicdVZLrhQxDNz3KWaN1FYcO79jsOIASMDiPSS4/wLHnyTNg1l5ynHFLjtJJ2glye+VIKWncX/0dUYYOSXm19f369eFH4KWsVyZGJrEJHwRF0goVprhN+Ly3Jky1CF2fr1fSNCq5XDgbwfeKjCp9fbgOfEf15dPr59X+n+Ov7//w/t+HTWUHlJgtmpgLHWoqUUwzHh9vQSttlAqLbFwFIeG+W6M2Bo7zFiEZn8aZI/NYTVoFFAb1gzV0mMJiBwlT5Cgd4dck5uB6xOasb0DmsT9UFVQFftA7z4gDxV6byNYC+xIaKRYulMXzCl3hQMhW+8eWghc6xijH6qNLBsI1g5xBctVsUcbBC6oO+2GCVZJlo6jrxtbTfdwh6UpvNc65+xB/Xv/qTefDJ6riD5w1dqS0RboaYE096qvu9oGS8BRbLGohUvByEFk5dUBLV2OUY851b6O3Tjg4VaH7tt1qH2BGKYdN2Mo+4Au/O0BI0mfu/CRzkwRZY0cEWX+NP/paIDF8p4O7R7pvjzL4QlLaUU7PhOn6vwCa5k5RNGKyDyZzB6T0mI1wDnnEEUbBR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NSczMCcpCi9Nb2REYXRlIChEOjIwMTkwNDE1MTcwNzEwKzA1JzMwJykKL1Byb2R1Y2VyIChNaWNyb3NvZnQ6IFByaW50IFRvIFBERikKL1RpdGxlICgxLmRvYykKPj4KZW5kb2JqCnhyZWYKMCA3DQowMDAwMDAwMDAwIDY1NTM1IGYNCjAwMDAwMDExNzMgMDAwMDAgbg0KMDAwMDAwMTExNCAwMDAwMCBuDQowMDAwMDAwOTM3IDAwMDAwIG4NCjAwMDAwMDAwMDkgMDAwMDAgbg0KMDAwMDAwMDkxNiAwMDAwMCBuDQowMDAwMDAxMjIyIDAwMDAwIG4NCnRyYWlsZXIKPDwKL0luZm8gNiAwIFIKL1Jvb3QgMSAwIFIKL1NpemUgNwo+PgpzdGFydHhyZWYKMTM5MAolJUVPRgo=\",\"title\":\"Laboratoryreport\",\"creation\":\"2021-03-15T16:12:43.2682813Z\"}}]}}]}", "media": "application/fhir+json", "checksum": null, "careContextReference": "55c4573d-d9da-49c3-85f9-261c5c317b4d", "link": null } ], "keyMaterial": { "cryptoAlg": "ECDH", "curve": "Curve25519", "dhPublicKey": { "expiry": "2021-03-15T16:12:43.4077066Z", "parameters": null, "keyValue": "MIIBMTCB6gYHKoZIzj0CATCB3gIBATArBgcqhkjOPQEBAiB/////////////////////////////////////////7TBEBCAqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqYSRShRAQge0Je0Je0Je0Je0Je0Je0Je0Je0Je0Je0JgtenHcQyGQEQQQqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq0kWiCuGaG4oIa04B7dLHdI0UySPU1+bXxhsinpxaJ+ztPZAiAQAAAAAAAAAAAAAAAAAAAAFN753qL3nNZYEmMaXPXT7QIBCANCAAQ+Dp+eEaXGdpD8t5MR1iOH4qQiLduMCkBFSoKA38WpihtrcUyi36bsHBmRp5E0yb1H2COBJDc3gn4IBpj1BGaK" }, "nonce": "DLNDgPKrAr3XGthN4Bk9AMfzGfLlgeHjj+uJHZLSLSg=" } }''';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @zoechi@JFixby@Douvi@lrhn@natebosch

        Issue actions

          Fails to decode valid json · Issue #257 · dart-lang/core