This project has moved. For the latest updates, please go here.

Method : of_add_entry

Signature

lnv_json.of_add_entry( as_object, as_pair_name, as_pair_value )

Where

Name Type Description
lnv_json n_cst_json an instance of n_cst_json class
as_object string The JSON object's name to be added
as_pair_name string The JSON Pair's name to be added
as_pair_value string The JSON Pair's value to be added


Return

Type Value Description
integer 1 Ok
-1 An error occurs

Usages

1. Adding two single instances pairs in one object
n_cst_json lnv_json
lnv_json.of_add_entry( "Windows Pos", "X", "150" )
lnv_json.of_add_entry( "Windows Pos", "y", "25" )

2. Adding multiple instances of a pair in one object
n_cst_json lnv_json
lnv_json.of_add_entry( "PowerBuilder", "Major Version", "12" )
lnv_json.of_add_entry( "PowerBuilder", "Sub version", "1" )
lnv_json.of_add_entry( "PowerBuilder", "Major Version", "12" )
lnv_json.of_add_entry( "PowerBuilder", "Sub version", "5" )

Last edited Jun 30, 2014 at 1:59 AM by domangep, version 6

Comments

No comments yet.