If supported, the $format system query option allows clients to request a response in a particular format.
The Beas Service Layer allows additional formats.
OData $format command, export types
Main formats:
Format |
Description |
json |
Return value in JSON format |
jsonarray |
Return json array |
xml |
Return value in XML format |
text/html |
Return as HTML Table <table> ..</table> |
csv |
Return as CSV string |
Additional formats:
You can define additional formats with comma, for example json,notempty,linefeed.
Only usable in combination with JSON, JSONARRAY or XML Format. No support in text/HTML, CSV or other formats.
Format |
Description |
notempty |
Export only string fields, which are not empty. (check only fields of Edm.String type) |
notnull |
Do not export fields, which are null. |
trim |
Delete all spaces on the right side. (only fields of Edm.String type) |
noheader |
Do not export the header. |
linefeed |
Insert a line feed and return the JSON/XML in a readable format. |
Note: Max. return size = 16 MByte (Unicode = 8 Million chars)
Standard JSON Workorder(1038)?$select=DocEntry,MailAddres,PrjCode
{"value": {"DocEntry":1038,"MailAddres":" ","PrjCode":null}}
JSON formated Workorder(1038)?$select=DocEntry,MailAddres,PrjCode&$format=linefeed
JSON without NULL values (PrjCode) Workorder(1038)?$select=DocEntry,MailAddres,PrjCode&$format=linefeed,notnull {
JSON without Spaces (see MailAddress) Workorder(1038)?$select=DocEntry,MailAddres,PrjCode&$format=linefeed,notnull,trim
JSON Array with linefeed
If you insert this in the browser, it returns the result in table format.
|