Custom Format : .simple

This format is designed to be easy to parse on systems without support for JSON or XML.

Definition

document character encoding UTF-8
table begins with name
table separator \n\n
record separator \n
field separator &
field represented as name="value"
\ ¶ " characters in "value"  are escaped with \
\n character in "value" translated to

Example URI and response

http://demo.restfm.com/RESTfm/postcodes/layout/brief%20postcodes.simple?RFMmax=2

Example simple format GET response.

data
Pcode="0810"&Locality="BRINKIN"&State="NT"&Comments=""
Pcode="0810"&Locality="CASUARINA"&State="NT"&Comments=""
 
meta
recordID="5900996"&xlink:href="/RESTfm/postcodes/layout/brief%20postcodes/5900996.simple"
recordID="5900997"&xlink:href="/RESTfm/postcodes/layout/brief%20postcodes/5900997.simple"
 
metaField
name="Pcode"&autoEntered="0"&global="0"&maxRepeat="1"&resultType="text"
name="Locality"&autoEntered="0"&global="0"&maxRepeat="1"&resultType="text"
name="State"&autoEntered="0"&global="0"&maxRepeat="1"&resultType="text"
name="Comments"&autoEntered="0"&global="0"&maxRepeat="1"&resultType="text"
 
info
tableRecordCount="16632"&foundSetCount="16632"&fetchCount="2"&skip="0"&X-RESTfm-Version="2.0.1/r280"&X-RESTfm-Protocol="4"&X-RESTfm-Status="200"&X-RESTfm-Reason="OK"&X-RESTfm-Method="GET"
 
nav
xlink:href="/RESTfm/postcodes/layout/brief%20postcodes.simple?RFMmax=2"&name="start"
xlink:href="/RESTfm/postcodes/layout/brief%20postcodes.simple?RFMmax=2&RFMskip=2"&name="next"
xlink:href="/RESTfm/postcodes/layout/brief%20postcodes.simple?RFMmax=2&RFMskip=end"&name="end"

Example Create/POST Message, URI and response

This example demonstrates the escaping of backslash (\), pilcrow (¶), double quotes ("), and the translation of newline into pilcrow (¶).

The unencoded "value" of the Comments field used below is:

Backslash: \
Pilcrow: ¶
Quote: "
When encoded as a single record in simple format, this becomes:
data
Pcode="9999"&Locality="New Location"&Comments="Backslash: \\¶Pilcrow: \¶¶Quote: \"¶"
Example simple format CREATE message.

Response:

http://demo.restfm.com/RESTfm/postcodes/layout/brief%20postcodes.simple

meta
recordID="10130284"&href="/RESTfm/postcodes/layout/brief%20postcodes/10130284.simple"
 
data
Pcode="9999"&Locality="New Location"&State=""&Comments="Backslash: \\¶Pilcrow: \¶¶Quote: \"¶"
 
info
X-RESTfm-Version="3.0.0beta/r430"&X-RESTfm-Protocol="4"&X-RESTfm-Status="201"&X-RESTfm-Reason="Created"&X-RESTfm-Method="POST"
 
metaField
name="Pcode"&autoEntered="0"&global="0"&maxRepeat="1"&resultType="text"
name="Locality"&autoEntered="0"&global="0"&maxRepeat="1"&resultType="text"
name="State"&autoEntered="0"&global="0"&maxRepeat="1"&resultType="text"
name="Comments"&autoEntered="0"&global="0"&maxRepeat="1"&resultType="text"

Example simple format CREATE response.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us