jsonProvider - handling underscore character
Hi guys,
How do you deal with underscore characters when using jsonProvider and exporting or importing ?
for example:
USER>s jsonString="{""what"":""1"",""up"":""2"",""test_test"":""3""}"
USER>set status = ##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject(jsonString,,.outputObj)
USER>w outputObj.what
1
USER>w outputObj.up
2
USER>w outputObj.test_test
W outputObj.test_test
^
<UNDEFINED> *testwe found out that we can access it like this, but not sure if it's the recommended method-
w outputObj.%data("test_test")Regards,
Nael
Comments
You can just use quotes
w outputObj."test_test"
Thanks Dmitry!
Is that documented?
Hi,
How do I accept an answer?
Alongside the "ANSWER" header, look for a checkmark that you can click. This screenshot highlights where:

Ok good to know thanks.
I accepted.
Its not east to notice it in my opinion.. but maybe it's just me.
Thanks,
Nael
John, please share your ideas on this feature improvement.
Maybe display the unchecked marks to the OP using a jazzy animation. Make it irritating enough and perhaps they'll get around to accepting an answer just to calm their screen down ![]()
It's not just you. The DC UI needs improving in this area, IMO.
Hi, Nael!
If the answer suits your question, would you please accept it?
TIA!