add jsonfld table to better describe json formatting
dmmeta.field field:ns.User.name
dmmeta.field field:ns.User.password
dmmeta.field field:ns.User.age # this will be used bc there is no jsonfld
dmmeta.field field:ns.User.address # this will be used bc there is no jsonfld
dmmeta.jsonfld jsonfld:ns.User.name/username omitdflt:N # this will rename the field
dmmeta.jsonfld jsonfld:ns.User.password/ omitdflt:N # this will remove the field
dmmeta.jsonfld jsonfld:ns.User.address/address omitdflt:Y # omit it if it is empty
so ns.User name:test password:pass age:30 address:"" becomes {"username":"test","age":30}
for encoding type foo:bar
if there is jsonfld:type.foo/tag. if tag is empty ignore the field, otw use the tag as the key for foo, or
use foo as the key
for decoding of json {"foo":"bar"} we can do these in order
A jsonfld with a tag of "foo" , or
A field with name "foo", or
A field named "FOO" or "Foo" or some other case-insensitive match of "foo".
add jsonfld table to better describe json formatting
so
ns.User name:test password:pass age:30 address:""
becomes{"username":"test","age":30}
for encoding
type foo:bar
jsonfld:type.foo/tag
. if tag is empty ignore the field, otw use the tag as the key forfoo
, orfoo
as the keyfor decoding of json
{"foo":"bar"}
we can do these in order