#1 2020-09-15 08:34:39

sakura
Member
From: Germany
Registered: 2018-02-21
Posts: 238
Website

[M2] JSON not loading correctly

Hi,

I wanted to start working on mORMot2, but got stumped on the first task already. Load JSON into a TDocVariantData record.

  var FileContent := StringFromFile(aFileName);
//  FRoot := TDocVariantData(JSONToVariant(FileContent));
  FRoot.InitJSON(FileContent);

Either way of loading the JSON file (uri: http://fhir.de/StructureDefinition/patient-de-basis/0.2 - there is a JSON representation and at the right/top of the page is a download link for the file) fails without(!) error.
However, the VName and VValue arrays are sized correctly, but contain only empty strings/Unassigned values throughout.

Same lines in mORMot 1.8 work perfectly fine.

Using Delphi 10.4.1, can anyone reproduce on other Delphi versions and/or FPC?

Regards,
Daniel

P.S.: Direct link to JSON file: https://simplifier.net/basisprofilde/pa … ormat=json

Last edited by sakura (2020-09-15 08:56:15)

Offline

#2 2020-09-15 12:33:18

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,548
Website

Re: [M2] JSON not loading correctly

mORMot2 is NOT TO BE USED YET.

This is clearly explained in the main ReadMe.md file.

Offline

#3 2020-09-15 12:51:19

sakura
Member
From: Germany
Registered: 2018-02-21
Posts: 238
Website

Re: [M2] JSON not loading correctly

I know, but I thought I might use the JSON already. No production system, but simply exploring it as needed. ;-)

P.S.: And getting used to the namespaces was my target here. :-D I have a compiler switch set to go back and forth. So, as soon as that works, I would be happy to explore more :-P

Last edited by sakura (2020-09-15 12:52:23)

Offline

#4 2020-09-15 12:53:32

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,548
Website

Re: [M2] JSON not loading correctly

big_smile

Offline

Board footer

Powered by FluxBB