sitemule / noxDB

Not only XML. SQL,JSON and XML made easy for IBM i
MIT License
42 stars 20 forks source link

Node where the key includes alternative separator is not located #52

Closed m1h43l closed 3 years ago

m1h43l commented 3 years ago

{ "area.code" : "32452" } cannot be located with the point character as a separator. jx_locate(json : '.area.code'); fails to locate the node. If this is intended we should document it somewhere.

Unit test NOXDBUT3 test case TEST_KEY_WITH_ALTERNATIVE_ELEMENT_SEPARATOR_ABSOLUTE .

m1h43l commented 3 years ago

Same also don't work with the "normal" path separator character, forward slash / .

Unit test NOXDBUT3 test case test_key_with_slash.

NielsLiisberg commented 3 years ago

Works as designed - the dot has the same function ad the forward slash: If you need alternative chars then change the delimiters. See examples:

./noxDB/examples/JSONPARS2E.JSON-Parse-String-names-with-dots.rpgle