- Code: Select all
{"Results":[{"InventoryID":"00000000040000000002","PartNo":"8100044"},{"InventoryID":"0000000009000000000J","PartNo":"8100052"},{"InventoryID":"00000000090000000013","PartNo":"8100206","Status":2}],"Meta":{}}
notice the third one has the status the explanation for which is it is actually executing the SQL
- Code: Select all
SELECT InventoryID,PartNo,Status
FROM [dbo].[IN_Main]
where partno in ('8100044','8100052','8100206')
when I run the SQL the first two have a status of zero and because 0 is the default for the integer field the api doesn't return it.
This is actually by design and can actually be changed in plugin code in Jiwa with
- Code: Select all
ServiceStack.Text.JsConfig.ExcludeDefaultValues = false;
or commenting it out in the REST api where its set to true, but the answer is simply when a field is not there accept the given that it is the default for that type such as strings are empty strings, numbers are zero and anything else will be a null.