TJSONObject.UnquotedMemberNames¶
Should member names be written unquoted or quoted in JSON.
Declaration¶
Source position: fpjson.pp line 717
public class property UnquotedMemberNames: Boolean;
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¶
| Name | Description |
|---|---|
| TJSONData.CompressedJSON | Compress JSON - skip whitespace. |