Jump to content

Component: JSON Encoder ( Comms): Difference between revisions

From Flowcode Help
No edit summary
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
 
(3 intermediate revisions by the same user not shown)
Line 38: Line 38:


===AssignDataAsFloat===
===AssignDataAsFloat===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AssignDataAsFloat'''
| width="90%" class="mtx-class-macrohead" | '''AssignDataAsFloat'''
|-
|-
| colspan="2" | Assigns a data value as a floating point number 
| colspan="2" | Assigns a data value as a floating point number 
Line 62: Line 62:


===AssignDataAsNumber===
===AssignDataAsNumber===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AssignDataAsNumber'''
| width="90%" class="mtx-class-macrohead" | '''AssignDataAsNumber'''
|-
|-
| colspan="2" | Assigns a data value as a number 
| colspan="2" | Assigns a data value as a number 
Line 86: Line 86:


===AssignDataAsString===
===AssignDataAsString===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AssignDataAsString'''
| width="90%" class="mtx-class-macrohead" | '''AssignDataAsString'''
|-
|-
| colspan="2" | Assigns a data value as a string  
| colspan="2" | Assigns a data value as a string  
Line 110: Line 110:


===ClearAll===
===ClearAll===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ClearAll'''
| width="90%" class="mtx-class-macrohead" | '''ClearAll'''
|-
|-
| colspan="2" | Clears all the names and data values out of the buffer  
| colspan="2" | Clears all the names and data values out of the buffer  
Line 124: Line 124:


===GenerateJSON===
===GenerateJSON===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GenerateJSON'''
| width="90%" class="mtx-class-macrohead" | '''GenerateJSON'''
|-
|-
| colspan="2" | Generates a JSON data string with the current specified values.  
| colspan="2" | Generates a JSON data string with the current specified values.  
Line 139: Line 139:
==Property reference==
==Property reference==


{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
{| class="mtx-class-macrotable wikitable"
|-
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
|-
|-
|}
|}

Latest revision as of 14:23, 13 July 2026

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