sitemule / noxDB

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

Constant differences #23

Closed worksofliam closed 4 years ago

worksofliam commented 4 years ago

What is the difference between these two constants?

I am guessing one is for numbers/strings and the other booleans?

NielsLiisberg commented 4 years ago

Literals are straight letters as is - no escape . Typically used for:

 true false null 0 1 2 3 4 5 6 7 8 9 .

This can also be used for binary string that is normally not supported in JSON

"values" are basically strings and will be escaped when used.

ex.

json_setvalue (pJson : 'example' : 'true' : JSON_LITERAL); { "example" : true }

json_setvalue (pJson : 'example' : 'true' : JSON_VALUE); { "example" : "true" }

On Thu, Jul 2, 2020 at 2:36 PM Liam Barry notifications@github.com wrote:

What is the difference between these two constants?

  • JX_VALUE
  • JX_LITERAL

I am guessing one is for numbers/strings and the other booleans?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sitemule/noxDB/issues/23, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVIPHVXTNIFFOTW3YAUNVLRZR5NRANCNFSM4OO3CK7Q .