TJSONObject.UnquotedMemberNames property
Should member names be written unquoted or quoted in JSON.
Declaration
property 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
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
