Skip to content

Instantly share code, notes, and snippets.

@robneville73
Created April 5, 2018 17:04
Show Gist options
  • Save robneville73/3ecf1a4041d8663f06909e1f74dbfde7 to your computer and use it in GitHub Desktop.
Save robneville73/3ecf1a4041d8663f06909e1f74dbfde7 to your computer and use it in GitHub Desktop.
sample changes to be made to json serialization
{
"zipcode": {
"_meta": {
"type": "ZipCode",
"keys": [
{"new": "zipcode", "existing": "zipcode"}
],
"serialization_formats": {
"created": "date-time-fractional"
},
"auto_updates": {
"zipcode": {
"updates": ["city", "stateid"],
"report_path": "self"
}
},
"resource_links": {
"all": "/tg/zipcode/query",
"entity": "/tg/zipcode/get?zipcode=29708",
"new": "/tg/zipcode/get_nextzipcodeid",
"lazy": [
{"customers": "/tg/customer/query?q=zipcode-EQ29708"}
],
"lookups": {
"stateid": {
"url": "/tg/state/query?q=enabled-EQY&orderby=state",
"cache": "states"
}
}
}
},
"zipcode": "29708",
"stateid": "SC",
"created": "2018-02-23 14:15:16.3467",
"city": "Fort Mill",
"taxrules": [
{
"_meta": {
"type": "TaxRule",
"resource": "/tg/taxrule",
"keys": [
"taxruleid"
]
},
"taxruleid": "sc",
"method": "L",
"roundlevel": "L"
}
],
"zones": [
{
"_meta": {
"type": "Zone",
"resource": "/tg/zone",
"keys": [
"zoneid"
]
},
"totalcharge": 22
}
]
}
}
{
"_meta": {
"type": "ZipCode",
"keys": [
{"new": "zipcode", "existing": "zipcode"}
],
"serialization_formats": {
"created": "date-time-fractional"
},
"resource_links": {
"all": "/tg/zipcode/query",
"entity": "/tg/zipcode/get?zipcode=29708",
"new": "/tg/zipcode/get_nextzipcodeid",
"lazy": [
{"customers": "/tg/customer/query?q=zipcode-EQ29708"}
],
"lookups": {
"fk_field_1": {
"dependson": ["depedant_field1", "dependent_field2"],
"query": "/tg/fk_table/q?#{dependant_field1}-EQ#{dependent_field2}"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment