[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'fpjson' (#fcl)

TJSONObject.UnquotedMemberNames

Should member names be written unquoted or quoted in JSON

Declaration

Source position: fpjson.pp line 531

public property TJSONObject.UnquotedMemberNames : Boolean
  read GetUnquotedMemberNames
  write SetUnquotedMemberNames;

Description

UnquotedMemberNames can be set to let AsJSON write the member names of a JSON object without quotes (True) or with quotes (False) around the member names.

When the value is False, JSON is written as:

{
  "name" : "Free Pascal",
  "type" : "Compiler"
}

When the value is True, JSON is written as:

{
  name : "Free Pascal",
  type : "Compiler"
}

Care must be taken when setting this property: The JSON standard requires the quotes to be written, but since JSON is mostly consumed in a Javascipt engine, the unquoted values are usually also accepted.

See also

TJSONData.CompressedJSON

  

Compress JSON - skip whitespace


Documentation generated on: Sep 28 2017