alexeilebedev / openacr

open-source version of acr & amc
GNU General Public License v3.0
34 stars 17 forks source link

jsonfld table #43

Open ali5h opened 1 year ago

ali5h commented 1 year ago

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

for decoding of json {"foo":"bar"} we can do these in order