Value

assemble_json_value_allcoate

AJsonValue *assemble_json_value_allcoate(AJsonType type, double number, char *string);

Description: Allocates a value of type "type" and returns it. If the value is of type A_JT_NUMBER, the "number" param will be used to set its value. If the value is of type A_JT_STRING, the "string" param will be used to set its value.

Types:

Enum:

AJsonType

A_JT_BOOLEAN

=

0

A_JT_NUMBER

=

1

A_JT_STRING

=

2

A_JT_OBJECT

=

3

A_JT_ARRAY

=

4

A_JT_NULL

=

5

A_JT_MODULO

=

8

Description:

A_JT_FALSE

=

A_JT_BOOLEAN

+

A_JT_MODULO

*

0

A_JT_TRUE

=

A_JT_BOOLEAN

+

A_JT_MODULO

*

1

A_JT_NUMBER_FLOAT

=

A_JT_NUMBER

+

A_JT_MODULO

*

0

A_JT_NUMBER_DOUBLE

=

A_JT_NUMBER

+

A_JT_MODULO

*

1

A_JT_NUMBER_DECIMAL

=

A_JT_NUMBER

+

A_JT_MODULO

*

2

A_JT_MULTIPLE

=

-1

assemble_json_value_type_get

AJsonType assemble_json_value_type_get(AJsonValue *value);

Description: Returns the type of a value. Note that by moduloing the output of this function with A_JT_MODULO it is possible to turn all A_JT_TRUE and A_JT_FALSE in to A_JT_BOLLEAN and all A_JT_NUMBER_FLOAT, A_JT_NUMBER_DOUBLE and A_JT_NUMBER_DECIMAL in to A_JT_NUMBER.

Types:

Enum:

AJsonType

A_JT_BOOLEAN

=

0

A_JT_NUMBER

=

1

A_JT_STRING

=

2

A_JT_OBJECT

=

3

A_JT_ARRAY

=

4

A_JT_NULL

=

5

A_JT_MODULO

=

8

Description:

A_JT_FALSE

=

A_JT_BOOLEAN

+

A_JT_MODULO

*

0

A_JT_TRUE

=

A_JT_BOOLEAN

+

A_JT_MODULO

*

1

A_JT_NUMBER_FLOAT

=

A_JT_NUMBER

+

A_JT_MODULO

*

0

A_JT_NUMBER_DOUBLE

=

A_JT_NUMBER

+

A_JT_MODULO

*

1

A_JT_NUMBER_DECIMAL

=

A_JT_NUMBER

+

A_JT_MODULO

*

2

A_JT_MULTIPLE

=

-1