Showing revision 1

Basic JData Examples

1. Constants and scalars

1. Constants and scalars

A numerical value is typically unchanged when converting to JData annotation, and is directly stored in the JSON/UBJSON numerical value forms. For example

Native data text-JData/JSON form
a=1
=>
{"a":1}

Similar for a floating point number

Native data text-JData/JSON form
a=3.14159
=>
{"a":3.14159}

There are a few special cases

Native data text-JData/JSON form
a=nan
=>
{"a":"_NaN_"}
a=inf
=>
{"a":"_Inf_"}
a=-inf
=>
{"a":"-_Inf_"}

There are a few special cases

Native data text-JData/JSON form
a=true
=>
{"a":true}
a=false
=>
{"a":false}
a=null
=>
{"a":null}
Powered by Habitat