Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 8.2   8.3   8.4   8.5   9.0   9.1   9.2   9.3   9.4   9.5    Statistic  

JSON.CreateNumber

Creates a new JSON encoded number.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
JSON 2.7 Yes Yes Yes Yes Yes
MBS( "JSON.CreateNumber"; value )   More

Parameters

Parameter Description Example value
value The number value. 123.4

Result

Returns JSON code.

Description

Creates a new JSON encoded number.
Version 10.0 or newer preserve formatting if you pass a text with a number containing digits with optionally one dot and one minus.

Examples

Creates a number:

MBS( "JSON.CreateNumber"; 123 )

Example result: 123

Create big number:

MBS( "JSON.CreateNumber"; 12063660878882855000013426248015578834577 )

Pass through vs. number parsing:

MBS( "JSON.CreateNumber"; "123.5" ) & ¶ & MBS( "JSON.CreateNumber"; 123,5 )
// in German with comma as separator second one is parsed as double precision value.

Example result:
123.5
123.500000

See also

Blog Entries

Release notes

Created 18th August 2014, last changed 27th November 2019


JSON.CreateNull   -   JSON.CreateObject

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins