Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
JSON.ToHTML
Converts JSON to HTML.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
JSON | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "JSON.ToHTML"; json { ; Flags; CSS Style } ) More
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
json | A JSON text or reference. | {"key":"value"} | |
Flags | The flags for processing. Currently you can pass 1 to exclude html header and just get a HTML table. Add 2 to process embedded quoted JSON (new in v14.2). |
0 | Optional |
CSS Style | Extra CSS / HTML to include. | Optional |
Result
Returns HTML text or error.
Description
Converts JSON to HTML.We build for you a HTML with tables for each array and object. We include values and tag rows with even/odd CSS classes.
Examples
Convert some JSON:
MBS("JSON.ToHTML"; JSON Input; 0;
/* CSS style to include */
"<style>
td
{
vertical-align:top;
}
.odd
{
background-color: white;
}
.even
{
background-color: #DDD;
}
</style>")
See also
Release notes
- Version 14.2
- Added flag value 2 for JSON.ToHTML function to process embedded JSON.
- Improved Matrix.HTML and JSON.ToHTML to use CSS for right alignment.
- Version 14.0
- Improved handling of arrays for our JSON to HTML conversion in JSON.ToHTML function.
- Version 13.1
- Fixed a crash in JSON.ToHTML function.
- Version 11.5
- Fixed a bug in JSON.ToHTML function.
- Version 9.3
- Fixed HTML tag for JSON.ToHTML.
- Version 8.4
- Fixed JSON.ToHTML to return text with CR as line ending.
- Version 8.3
- Changed JSON.ToHTML to use @attributes with lowercase a.
- Version 8.2
- Added JSON.Colorize and JSON.ToHTML functions.
Example Databases
Blog Entries
- MBS FileMaker Plugin, version 14.2pr5
- MBS FileMaker Plugin, version 14.2pr4
- MBS FileMaker Plugin, version 14.2pr1
- MBS FileMaker Plugin, version 13.6pr3
- MBS FileMaker Plugin, version 13.1pr2
- MBS FileMaker Plugin, version 11.5pr3
- With JSON in excellent form
- MBS FileMaker Plugin, version 9.3pr7
- MBS FileMaker Plugin, version 8.4pr9
- Converting JSON to HTML for display
FileMaker Magazin
This function checks for a license.
Created 26th April 2018, last changed 30th April 2024