Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
JSON.ToXML
Converts JSON to XML.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
JSON | 10.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "JSON.ToXML"; JSON { ; RootNodeName } ) More
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
JSON | A JSON text or reference. | {"key": "value"} | |
RootNodeName | The root node name to use. | "test" | Optional |
Result
Returns XML text or error.
Description
Converts JSON to XML.Walks over nodes in JSON and adds them to XML.
This function does not perfectly reverse XML.ToJSON, but it comes close.
Changes in version 10.4: If root node name parameter is empty and the JSON is an object with one entry, we take this as root element.
Examples
Convert some JSON:
MBS( "JSON.ToXML"; "{\"first\": \"Peter\", \"age\": 38}"; "test" )
Example result:
<?xml version="1.0" encoding="UTF-8"?>
<test>
<first>Peter</first>
<age>38</age>
</test>
See also
Release notes
- Version 12.4
- Changed JSON.ToXML to better convert arrays.
- Changed JSON.ToXML to unpack the text nodes made by XML.ToJSON.
- Version 10.5
- Changed JSON.ToXML to unpack attributes with just @ in front.
- Version 10.4
- Changed JSON.ToXML to recreate attributes stored as @attributes entry by XML.ToJSON function.
- Version 10.3
- Added JSON.ToXML function.
Example Databases
Blog Entries
- MBS FileMaker Plugin, version 12.4pr3
- MBS FileMaker Plugin, version 12.4pr2
- MBS FileMaker Plugin, version 10.5pr1
- MBS FileMaker Plugin, version 10.4pr8
- What is new in the MBS FileMaker Plugin Version 10.3
- Neues MBS FileMaker Plugin 10.3 - Über 6200 Funktionen in einem Plugin
- MBS FileMaker Plugin 10.3 - More than 6200 Functions In One Plugin
- MBS FileMaker Plugin, version 10.3pr5
FileMaker Magazin
This function checks for a license.
Created 20th June 2020, last changed 4th September 2020
