Synergex/HarmonyCore

Json classes

shiblydangdang opened this issue · 1 comments

Hi guys

I'm trying to use the Json classes in my back end code that is called from a HarmonyCore shim but its complaining about GetProperty when I try and compile.

507                elementName = element.GetProperty("Name")

%DBL-E-NFND, element.GetProperty() not found
508 elementValue = element.GetProperty("StringData").GetString()
%DBL-E-NFND, element.GetProperty().GetString() not found

jsDoc, 			@JsonDocument
    element, 		@JsonElement
    elementName, 		@JsonElement
elementValue,		string

proc

    jsDoc = JsonDocument.Parse(data)
    element = jsDoc.RootElement
    elementName = element.GetProperty("Name")
elementValue = element.GetProperty("StringData").GetString()

It seems to be happy with JsonDocument.Parse and RootElement.

Presume I'm missing something simple - do I need to compile it differently?

Thanks

Hi Tony,
Not sure why your code isn’t working; hard to know without seeing the whole thing. But here is a working example of both assembling and parsing a JSON document.

https://github.com/SteveIves/JsonParserExample

I will close this issue because it isn't Harmony Core-related and should have been logged with the regular Synergy Developer Support team. Anyway, I hope this helps.