Jump to content

Component: JSON Encoder ( Comms): Difference between revisions

From Flowcode Help
Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | |- | width="20%" style="color:gray;" | Version | 0.1 |- | width="20%" style="color:gray;" | Categ..."
 
Line 27: Line 27:
==Examples==
==Examples==


''<span style="color:red;">No additional examples</span>''
===Simple Data===
 
Example program showing how to use a JSON encoder component to create a simple JSON encoded data string.
 
{{Fcfile|Web_JSON_Encoder.fcsx|Web JSON Encoder Example}}


==Macro reference==
==Macro reference==

Revision as of 10:32, 28 November 2023

Author
Version 0.1
Category Comms


JSON Encoder component

Allows dynamic key and value pairs to be created and assembled into a formatted JSON string.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_WEBEXP_JSONEncoder.fcsx

Please click here to view the component source code (Beta): FC_Comp_Source_WEBEXP_JSONEncoder.fcsx

Detailed description

No detailed description exists yet for this component

Examples

Simple Data

Example program showing how to use a JSON encoder component to create a simple JSON encoded data string.

Web JSON Encoder Example

Macro reference

AssignDataAsFloat

AssignDataAsFloat
Assigns a data value as a floating point number 
- STRING Key
Key name for the data 
- FLOAT Value
Value of the data 
- VOID Return


AssignDataAsNumber

AssignDataAsNumber
Assigns a data value as a number 
- STRING Key
Key name for the data 
- LONG Value
Value of the data 
- VOID Return


AssignDataAsString

AssignDataAsString
Assigns a data value as a string  
- STRING Key
Key name for the data 
- STRING Value
Value of the data 
- VOID Return


ClearAll

ClearAll
Clears all the names and data values out of the buffer  
- VOID Return


GenerateJSON

GenerateJSON
Generates a JSON data string with the current specified values.  
- STRING Return


Property reference

Properties