-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1642 from KamasamaK/serializejson-20240306
Update serialization options
- Loading branch information
Showing
4 changed files
with
37 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
{ | ||
"name":"serializeXML", | ||
"type":"function", | ||
"syntax":"serializeXML( Object objToBeSerialized, boolean useCustomSerializer );", | ||
"syntax":"serializeXML( objToBeSerialized, useCustomSerializer )", | ||
"returns":"string", | ||
"related":["xmlParse","xmlNew","deserializeXML","isXMLDoc","encodeForXML"], | ||
"description":"Serializes a ColdFusion object to XML.", | ||
"description":"Serializes the given object to XML.", | ||
"params": [ | ||
{"name":"objToBeSerialized","description":"An object to be serialized.","required":true,"default":"","type":"any","values":[]}, | ||
{"name":"useCustomSerializer","description":"Boolean. Whether to use the custom serializer or not. The default value is true. The custom serializer will be always used for XML deserialization. If false, the XML/JSON deserialization will be done using the default ColdFusion behavior. If any other type is passed with useCustomSerializer as false, then TypeNotSupportedException will be thrown.","required":true,"default":"","type":"boolean","values":[]} | ||
{"name":"useCustomSerializer","description":"Whether to use the custom serializer. The default value is true. The custom serializer will be always used for XML deserialization. If false, the XML/JSON deserialization will be done using the default ColdFusion behavior. If any other type is passed with useCustomSerializer as false, then TypeNotSupportedException will be thrown.","required":false,"default":true,"type":"boolean","values":[]} | ||
], | ||
"engines": { | ||
"coldfusion": {"minimum_version":"11", "notes":"", "docs":"https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-s/serializexml.html"} | ||
}, | ||
"links": [], | ||
"examples": [ | ||
{ | ||
"title": "Tag Syntax", | ||
"description": "serializeXML is a new function added in ColdFusion 11. This function will serialize the object to XML using ColdFusion's default serialization mechanism.", | ||
"code": "... <cfreturn serializeXML(arguments.arg)> \r\n", | ||
"result": "" | ||
{ | ||
"title": "Serialize a struct to XML (Script syntax)", | ||
"description": "This will serialize the object to XML using ColdFusion's default serialization mechanism.", | ||
"code": "serializeXML({ \"firstName\": \"John\", \"lastName\": \"Doe\" })", | ||
"result": "<STRUCT ID=\"1\"><ENTRY NAME=\"lastName\" TYPE=\"STRING\">Doe<\/ENTRY><ENTRY NAME=\"firstName\" TYPE=\"STRING\">John<\/ENTRY><\/STRUCT>" | ||
} | ||
] | ||
} |