ParseCFParams ( paramStringJSON )
Provides a unified, if slightly idiosyncratic, method for passing multiple JSON params into a CF.
Be the first to rate this function Log in to vote
Richard Dyce - Show more from this author
Dyce & Sons Ltd. http://dyce.com |
// plus these variable assignments as side_effects
$stuff = {"Age":"51.999","Favourite Colour":"Teal","name":"Richard"}
$name = Richard
$Favourite_Colour = Teal
$args = 4¶51.999¶Teal¶Richard¶{"Age":"51.999","Favourite Colour":"Teal","name":"Richard"}
$Age = 51.99
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
Converts a JSON string parameter into local variables
1. it uses the JSON keys to create local variables ;
2. it also save the list of param values in $args ;
3. it returns the param count ;
4. it preserves JSON object parameters ; and
5. it returns -1 on an empty string or JSON error.
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.