Brian Dunning's FileMaker Custom Functions

cf_jsonFormat ( json ; indent )

replace tab in jsonFormateElement function, make json more readable

  Be the first to rate this function Log in to vote

jeff liao   jeff liao - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
cf_jsonFormat ( Get ( InstalledFMPluginsAsJSON ) ; " " )
  Sample output:
{
"APIVers" : 1,
"plugins" :
[
{
"description" : "Version: 4.1.4\n\nThis plug-in provides additional functionality for BaseElements from Goya.",
"filepath" : "filemac:/OS X/Users/jsl/Library/Application Support/FileMaker/FileMaker Pro/19.0/Extensions/BaseElements.fmplugin/",
"id" : "GyBE",
"name" : "BaseElements",
"state" : "Enabled",
"version" : "4.1.4"
},
{
"description" : "The MBS Plugin extends FileMaker with thousands of functions.\n\nVersion 11.2.0.09, build 5391 from May 17 2021.\n\nSee monkeybreadsoftware.com for more information.",
"filepath" : "filemac:/OS X/Users/jsl/Library/Application Support/FileMaker/FileMaker Pro/19.0/Extensions/MBS.fmplugin/",
"id" : "MBSP",
"name" : "MBS Plug-In",
"state" : "Enabled",
"version" : "11.2.0.09"
}
]
}

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

jsonFormatElements use tab as a spacer, if you think it's too wide to view,
you can this function to shrink the space
or you can use another chacacters to ruin the json

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: