This section presents various examples demonstrating the functionalities of the GenericContainer class.
This example illustrates basic operations, including setting and retrieving integer values.
***********************
example N.1
***********************
GenericContainer simple usage
gc1: Integer: 1
gc2: Floating Point: 1.2
gc3: Boolean: true
gc4: String: pippo
gc5: GenericContainer: No data stored
ALL DONE!
This example shows how to create and manipulate a vector within a GenericContainer.
***********************
example N.2
***********************
GenericContainer simple usage
gc1: GenericContainer: No data stored
gc2: GenericContainer: No data stored
gc3: GenericContainer: No data stored
gc4: GenericContainer: No data stored
gc5: GenericContainer: No data stored
After initialization
gc1: Integer: 1
gc2: Floating Point: 1.2
gc3: Boolean: true
gc4: String: pippo
gc5: GenericContainer: No data stored
ALL DONE!
Demonstrates how to create and manipulate maps within a GenericContainer.
***********************
example N.3
***********************
STEP1 gc: GenericContainer: No data stored
STEP2 gc: Vector of generic data type of size 0
STEP3 gc: Vector of generic data type of size 10
STEP4 gc:
Vector of generic data type of size 10
0: 1
1: 1.2
2: true
3: "pippo"
4: 1
5: 1.2
6: true
7: "pippo"
8: null
9: null
in GenericContainer: operator () const, index 15 out of range
ALL DONE!
Illustrates how to create nested containers with vectors and maps.
***********************
example N.4
***********************
STEP1 gc: GenericContainer: No data stored
STEP2 gc: Map
STEP3 gc: Map
STEP4 gc:
Map
a: 1
b: 1.2
c: true
d: "pippo"
e: 1
f: 1.2
g: true
pointer: 0x16f0a6a00
vec_real:
[ 1 2 3 4 ]
in GenericContainer: bad data type, expect: vector_type but data stored is of type: map_type
ALL DONE!
This example showcases how to serialize and deserialize a GenericContainer.
***********************
example N.5
***********************
Print gc:
0: 1
1: [ 0 0 123 0 0 0 0 0 0 0 ]
2:
aaa: "stringa1"
bbb: "stringa2"
paperino: 3
pippo: 13
pluto: 1
3:
0: "string1"
1: "string2"
2: "string3"
3: "string4"
4: 1.3
5: "pippo"
6:
aaa: 123
bbb: 3.4
vector:
[ 12 10 1 ]
7:
0: 123
1: 3.14
2: "nonna papera"
8: true
9: null
Print gc:
null
Print gc1:
0: 1
1: [ 0 0 123 0 0 0 0 0 0 0 ]
2:
aaa: "stringa1"
bbb: "stringa2"
paperino: 3
pippo: 13
pluto: 1
3:
0: "string1"
1: "string2"
2: "string3"
3: "string4"
4: 1.3
5: "pippo"
6:
aaa: 123
bbb: 3.4
vector:
[ 12 10 1 ]
7:
0: 123
1: 3.14
2: "nonna papera"
8: true
9: null
ALL DONE!
Example of usage of the C interface.
***********************
example N.6
***********************
0: 1
1: [ 1.1 2.2 3.3 4.4 ]
2:
aaa: "stringa"
paperino: 3
pippo: 13
pluto: 1
3:
0: "string1"
1: "string2"
2: "string3"
3: "string4"
4: 1.3
5: "pippo"
6:
aaa: 123
bbb: 3.4
vector:
[ 12 10 1 ]
7:
0: 123
1: 3.14
2: "nonna papera"
8: true
9: null
ALL DONE!
This example demonstrates the use of file I/O with GenericContainer to read and print formatted data.
# Date: 23:37:39 2022-11-10 # MX Version: 1.5.1-d142dirty-osx_13.0 hash: f78c1e6a Thu Nov 10 00:49:36 2022 # Computation type: Optimal control solution # Model name: ICLOCS_MinimumFuelOrbitRaising # #! converged = YES #! num_equations = 2411 #! Lagrange target = -0.5252740061732518 #! Mayer target = 0 #! Penalties = 0 #! Control Penalties = 0 #! max_iter = 300 #! max_step_iter = 40 #! max_accumulated_iter = 800 #! tolerance = 9.999999999999999e-10 #! iterations = 9 #! cpu_time = 31.388 ms #! solver_type = CyclicReduction+LU and LastBlock LUPQ #! lapack version = Accelerate # # SOLUTION i_segment zeta lagrange_target inequality_penalties penalties control_penalties theta theta_cell r vr vt lambda1__xo lambda2__xo lambda3__xo r_D vr_D vt_D mu0_D mu1_D mu2_D THETA MASS 0 0 3.83335121988244145e-24 0 0 0 0.431767195334314069 0.431767195334314069 1 -3.83335121988244145e-24 1 -0.877337087218752587 -0.928952238240128514 -2.02514653387216637 -3.83335121988244145e-24 0.058795944131343543 0.127605983220630825 0.928952238240128514 -0.14780944665341389 1.85790447648025703 0.431767195334314069 1 0 0.00830000000000000009 -0.000496945325703529732 0 0 0 0.433474050458908022 0.435180905583501976 1.00000206232310163 0.000496945325703529732 1.00105739556634288 -0.869625817994938433 -0.930155840503653852 -2.00971195520261903 0.000496945325703529732 0.0611683403197462242 0.127087287078375633 0.929179819089718584 -0.14220704866934053 1.8612762108157439 0.433474050458908022 0.999378329999999981 0 0.0166000000000000002 -0.00101537275813047578 0 0 0 0.436901655787864773 0.438622405992227626 1.00000833844314951 0.00101537275813047578 1.00210955412627545 -0.861912784227839124 -0.931312622368338672 -1.99424994705747882 0.00101537275813047578 0.0637562246986424219 0.126443388053484207 0.929377317323367813 -0.136527477153772336 1.86451409929345302 0.436901655787864773 0.998756659999999963 0 0.024900000000000002 -0.00155527572126624015 0 0 0 0.440357131765090393 0.442091857537953214 1.00001900663433907 0.00155527572126624015 1.0031562607964406 -0.854198242060344337 -0.93242194498679809 -1.97876162589924998 0.00155527572126624015 0.0663431620239074704 0.125773551919138943 0.929543176882371647 -0.130771143996937678 1.86761680661033846 0.440357131765090393 0.998134990000000055 0 0.0332000000000000003 -0.00211664505276475861 0 0 0 0.443840639360533529 0.445589421183113843 1.00003424510555128 0.00211664505276475861 1.00419729992056017 -0.846482460541043258 -0.933483173043368919 -1.96324811923792319 0.00211664505276475861 0.0689288380619269697 0.12507768765539265 0.929675844110318117 -0.124938488353316224 1.87058300605143679 0.443840639360533529 0.997513320000000037
notice that # introduce a comment, the first line that start without # is the header line and the lines staring with #! are assignment A = B that are stored in the GenericContainer.
***********************
example N.7
***********************
data:
0: [ 0 0 0 0 0 ]
1: [ 0 0.0083 0.0166 0.0249 0.0332 ]
2: [ 3.83335e-24 -0.000496945 -0.00101537 -0.00155528 -0.00211665 ]
3: [ 0 0 0 0 0 ]
4: [ 0 0 0 0 0 ]
5: [ 0 0 0 0 0 ]
6: [ 0.431767 0.433474 0.436902 0.440357 0.443841 ]
7: [ 0.431767 0.435181 0.438622 0.442092 0.445589 ]
8: [ 1 1 1.00001 1.00002 1.00003 ]
9: [ -3.83335e-24 0.000496945 0.00101537 0.00155528 0.00211665 ]
10: [ 1 1.00106 1.00211 1.00316 1.0042 ]
11: [ -0.877337 -0.869626 -0.861913 -0.854198 -0.846482 ]
12: [ -0.928952 -0.930156 -0.931313 -0.932422 -0.933483 ]
13: [ -2.02515 -2.00971 -1.99425 -1.97876 -1.96325 ]
14: [ -3.83335e-24 0.000496945 0.00101537 0.00155528 0.00211665 ]
15: [ 0.0587959 0.0611683 0.0637562 0.0663432 0.0689288 ]
16: [ 0.127606 0.127087 0.126443 0.125774 0.125078 ]
17: [ 0.928952 0.92918 0.929377 0.929543 0.929676 ]
18: [ -0.147809 -0.142207 -0.136527 -0.130771 -0.124938 ]
19: [ 1.8579 1.86128 1.86451 1.86762 1.87058 ]
20: [ 0.431767 0.433474 0.436902 0.440357 0.443841 ]
21: [ 1 0.999378 0.998757 0.998135 0.997513 ]
headers:
0: "i_segment"
1: "zeta"
2: "lagrange_target"
3: "inequality_penalties"
4: "penalties"
5: "control_penalties"
6: "theta"
7: "theta_cell"
8: "r"
9: "vr"
10: "vt"
11: "lambda1__xo"
12: "lambda2__xo"
13: "lambda3__xo"
14: "r_D"
15: "vr_D"
16: "vt_D"
17: "mu0_D"
18: "mu1_D"
19: "mu2_D"
20: "THETA"
21: "MASS"
Data Read:
i_segment zeta lagrange_target inequality_penalties penalties control_penalties theta theta_cell r vr vt lambda1__xo lambda2__xo lambda3__xo r_D vr_D vt_D mu0_D mu1_D mu2_D THETA MASS
0 0 3.83335e-24 0 0 0 0.431767 0.431767 1 -3.83335e-24 1 -0.877337 -0.928952 -2.02515 -3.83335e-24 0.0587959 0.127606 0.928952 -0.147809 1.8579 0.431767 1
0 0.0083 -0.000496945 0 0 0 0.433474 0.435181 1 0.000496945 1.00106 -0.869626 -0.930156 -2.00971 0.000496945 0.0611683 0.127087 0.92918 -0.142207 1.86128 0.433474 0.999378
0 0.0166 -0.00101537 0 0 0 0.436902 0.438622 1.00001 0.00101537 1.00211 -0.861913 -0.931313 -1.99425 0.00101537 0.0637562 0.126443 0.929377 -0.136527 1.86451 0.436902 0.998757
0 0.0249 -0.00155528 0 0 0 0.440357 0.442092 1.00002 0.00155528 1.00316 -0.854198 -0.932422 -1.97876 0.00155528 0.0663432 0.125774 0.929543 -0.130771 1.86762 0.440357 0.998135
0 0.0332 -0.00211665 0 0 0 0.443841 0.445589 1.00003 0.00211665 1.0042 -0.846482 -0.933483 -1.96325 0.00211665 0.0689288 0.125078 0.929676 -0.124938 1.87058 0.443841 0.997513
ALL DONE!
This example shows how to create and manipulate a matrix using GenericContainer.
***********************
example N.8
***********************
Result:
0 3
0 2
Matrix of floating point number of size 2 x 2
ALL DONE!
This example illustrates advanced serialization and deserialization of GenericContainer.
***********************
example N.9
***********************
Size: 242
Size1: 242
--------------------------
paperino: "pippo"
pippo:
22323 4443
432 433
pluto:
0: "nonna"
1: "papera"
vector:
0: 1.234
1: true
2: [ 1 -1 2 4 ]
3: "superkaly"
4: 1+2i
--------------------------
paperino: "pippo"
pippo:
22323 4443
432 433
pluto:
0: "nonna"
1: "papera"
vector:
0: 1.234
1: true
2: [ 1 -1 2 4 ]
3: "superkaly"
4: 1+2i
ALL DONE!
This example demonstrates reading formatted data from a file and displaying it using GenericContainer.
***********************
example N.10
***********************
GC1 --------------------------
data:
0: [ 0 0 0 0 0 ]
1: [ 0 0.0083 0.0166 0.0249 0.0332 ]
2: [ 3.83335e-24 -0.000496945 -0.00101537 -0.00155528 -0.00211665 ]
3: [ 0 0 0 0 0 ]
4: [ 0 0 0 0 0 ]
5: [ 0 0 0 0 0 ]
6: [ 0.431767 0.433474 0.436902 0.440357 0.443841 ]
7: [ 0.431767 0.435181 0.438622 0.442092 0.445589 ]
8: [ 1 1 1.00001 1.00002 1.00003 ]
9: [ -3.83335e-24 0.000496945 0.00101537 0.00155528 0.00211665 ]
10: [ 1 1.00106 1.00211 1.00316 1.0042 ]
11: [ -0.877337 -0.869626 -0.861913 -0.854198 -0.846482 ]
12: [ -0.928952 -0.930156 -0.931313 -0.932422 -0.933483 ]
13: [ -2.02515 -2.00971 -1.99425 -1.97876 -1.96325 ]
14: [ -3.83335e-24 0.000496945 0.00101537 0.00155528 0.00211665 ]
15: [ 0.0587959 0.0611683 0.0637562 0.0663432 0.0689288 ]
16: [ 0.127606 0.127087 0.126443 0.125774 0.125078 ]
17: [ 0.928952 0.92918 0.929377 0.929543 0.929676 ]
18: [ -0.147809 -0.142207 -0.136527 -0.130771 -0.124938 ]
19: [ 1.8579 1.86128 1.86451 1.86762 1.87058 ]
20: [ 0.431767 0.433474 0.436902 0.440357 0.443841 ]
21: [ 1 0.999378 0.998757 0.998135 0.997513 ]
headers:
0: "i_segment"
1: "zeta"
2: "lagrange_target"
3: "inequality_penalties"
4: "penalties"
5: "control_penalties"
6: "theta"
7: "theta_cell"
8: "r"
9: "vr"
10: "vt"
11: "lambda1__xo"
12: "lambda2__xo"
13: "lambda3__xo"
14: "r_D"
15: "vr_D"
16: "vt_D"
17: "mu0_D"
18: "mu1_D"
19: "mu2_D"
20: "THETA"
21: "MASS"
GC2 --------------------------
data:
MASS:
[ 1 0.999378 0.998757 0.998135 0.997513 ]
THETA:
[ 0.431767 0.433474 0.436902 0.440357 0.443841 ]
control_penalties:
[ 0 0 0 0 0 ]
i_segment:
[ 0 0 0 0 0 ]
inequality_penalties:
[ 0 0 0 0 0 ]
lagrange_target:
[ 3.83335e-24 -0.000496945 -0.00101537 -0.00155528 -0.00211665 ]
lambda1__xo:
[ -0.877337 -0.869626 -0.861913 -0.854198 -0.846482 ]
lambda2__xo:
[ -0.928952 -0.930156 -0.931313 -0.932422 -0.933483 ]
lambda3__xo:
[ -2.02515 -2.00971 -1.99425 -1.97876 -1.96325 ]
mu0_D:
[ 0.928952 0.92918 0.929377 0.929543 0.929676 ]
mu1_D:
[ -0.147809 -0.142207 -0.136527 -0.130771 -0.124938 ]
mu2_D:
[ 1.8579 1.86128 1.86451 1.86762 1.87058 ]
penalties:
[ 0 0 0 0 0 ]
r:
[ 1 1 1.00001 1.00002 1.00003 ]
r_D:
[ -3.83335e-24 0.000496945 0.00101537 0.00155528 0.00211665 ]
theta:
[ 0.431767 0.433474 0.436902 0.440357 0.443841 ]
theta_cell:
[ 0.431767 0.435181 0.438622 0.442092 0.445589 ]
vr:
[ -3.83335e-24 0.000496945 0.00101537 0.00155528 0.00211665 ]
vr_D:
[ 0.0587959 0.0611683 0.0637562 0.0663432 0.0689288 ]
vt:
[ 1 1.00106 1.00211 1.00316 1.0042 ]
vt_D:
[ 0.127606 0.127087 0.126443 0.125774 0.125078 ]
zeta:
[ 0 0.0083 0.0166 0.0249 0.0332 ]
headers:
0: "i_segment"
1: "zeta"
2: "lagrange_target"
3: "inequality_penalties"
4: "penalties"
5: "control_penalties"
6: "theta"
7: "theta_cell"
8: "r"
9: "vr"
10: "vt"
11: "lambda1__xo"
12: "lambda2__xo"
13: "lambda3__xo"
14: "r_D"
15: "vr_D"
16: "vt_D"
17: "mu0_D"
18: "mu1_D"
19: "mu2_D"
20: "THETA"
21: "MASS"
PARS --------------------------
Control Penalties: 0
Lagrange target: -0.525274
Mayer target: 0
Penalties: 0
converged: "YES"
cpu_time: 31.388
iterations: 9
lapack version: "Accelerate"
max_accumulated_iter: 800
max_iter: 300
max_step_iter: 40
num_equations: 2411
solver_type: "CyclicReduction+LU and LastBlock LUPQ"
tolerance: 1e-09
GC2 COPY ----------------------
data:
MASS:
[ 1 0.999378 0.998757 0.998135 0.997513 ]
THETA:
[ 0.431767 0.433474 0.436902 0.440357 0.443841 ]
control_penalties:
[ 0 0 0 0 0 ]
i_segment:
[ 0 0 0 0 0 ]
inequality_penalties:
[ 0 0 0 0 0 ]
lagrange_target:
[ 3.83335e-24 -0.000496945 -0.00101537 -0.00155528 -0.00211665 ]
lambda1__xo:
[ -0.877337 -0.869626 -0.861913 -0.854198 -0.846482 ]
lambda2__xo:
[ -0.928952 -0.930156 -0.931313 -0.932422 -0.933483 ]
lambda3__xo:
[ -2.02515 -2.00971 -1.99425 -1.97876 -1.96325 ]
mu0_D:
[ 0.928952 0.92918 0.929377 0.929543 0.929676 ]
mu1_D:
[ -0.147809 -0.142207 -0.136527 -0.130771 -0.124938 ]
mu2_D:
[ 1.8579 1.86128 1.86451 1.86762 1.87058 ]
penalties:
[ 0 0 0 0 0 ]
r:
[ 1 1 1.00001 1.00002 1.00003 ]
r_D:
[ -3.83335e-24 0.000496945 0.00101537 0.00155528 0.00211665 ]
theta:
[ 0.431767 0.433474 0.436902 0.440357 0.443841 ]
theta_cell:
[ 0.431767 0.435181 0.438622 0.442092 0.445589 ]
vr:
[ -3.83335e-24 0.000496945 0.00101537 0.00155528 0.00211665 ]
vr_D:
[ 0.0587959 0.0611683 0.0637562 0.0663432 0.0689288 ]
vt:
[ 1 1.00106 1.00211 1.00316 1.0042 ]
vt_D:
[ 0.127606 0.127087 0.126443 0.125774 0.125078 ]
zeta:
[ 0 0.0083 0.0166 0.0249 0.0332 ]
headers:
0: "i_segment"
1: "zeta"
2: "lagrange_target"
3: "inequality_penalties"
4: "penalties"
5: "control_penalties"
6: "theta"
7: "theta_cell"
8: "r"
9: "vr"
10: "vt"
11: "lambda1__xo"
12: "lambda2__xo"
13: "lambda3__xo"
14: "r_D"
15: "vr_D"
16: "vt_D"
17: "mu0_D"
18: "mu1_D"
19: "mu2_D"
20: "THETA"
21: "MASS"
GC2 COPY2 ---------------------
data:
MASS:
[ 1 0.999378 0.998757 0.998135 0.997513 ]
THETA:
[ 0.431767 0.433474 0.436902 0.440357 0.443841 ]
control_penalties:
[ 0 0 0 0 0 ]
i_segment:
[ 0 0 0 0 0 ]
inequality_penalties:
[ 0 0 0 0 0 ]
lagrange_target:
[ 3.83335e-24 -0.000496945 -0.00101537 -0.00155528 -0.00211665 ]
lambda1__xo:
[ -0.877337 -0.869626 -0.861913 -0.854198 -0.846482 ]
lambda2__xo:
[ -0.928952 -0.930156 -0.931313 -0.932422 -0.933483 ]
lambda3__xo:
[ -2.02515 -2.00971 -1.99425 -1.97876 -1.96325 ]
mu0_D:
[ 0.928952 0.92918 0.929377 0.929543 0.929676 ]
mu1_D:
[ -0.147809 -0.142207 -0.136527 -0.130771 -0.124938 ]
mu2_D:
[ 1.8579 1.86128 1.86451 1.86762 1.87058 ]
penalties:
[ 0 0 0 0 0 ]
r:
[ 1 1 1.00001 1.00002 1.00003 ]
r_D:
[ -3.83335e-24 0.000496945 0.00101537 0.00155528 0.00211665 ]
theta:
[ 0.431767 0.433474 0.436902 0.440357 0.443841 ]
theta_cell:
[ 0.431767 0.435181 0.438622 0.442092 0.445589 ]
vr:
[ -3.83335e-24 0.000496945 0.00101537 0.00155528 0.00211665 ]
vr_D:
[ 0.0587959 0.0611683 0.0637562 0.0663432 0.0689288 ]
vt:
[ 1 1.00106 1.00211 1.00316 1.0042 ]
vt_D:
[ 0.127606 0.127087 0.126443 0.125774 0.125078 ]
zeta:
[ 0 0.0083 0.0166 0.0249 0.0332 ]
headers:
0: "i_segment"
1: "zeta"
2: "lagrange_target"
3: "inequality_penalties"
4: "penalties"
5: "control_penalties"
6: "theta"
7: "theta_cell"
8: "r"
9: "vr"
10: "vt"
11: "lambda1__xo"
12: "lambda2__xo"
13: "lambda3__xo"
14: "r_D"
15: "vr_D"
16: "vt_D"
17: "mu0_D"
18: "mu1_D"
19: "mu2_D"
20: "THETA"
21: "MASS"
ALL DONE!
address:
city: "Springfield"
coordinates:
latitude: 39.7817
longitude: -89.6501
postalCode: 62704
state: "IL"
street: "1234 Elm Street"
age: 35
boolean_false: false
boolean_true: true
children:
-
age: 10
hobbies:
- "reading"
- "drawing"
- "cycling"
name: "Jane Doe"
-
age: 8
hobbies:
- "video games"
- "swimming"
- "football"
name: "Johnny Doe"
float_example: 12345.7
history:
- "created account"
- "updated profile"
- "added new property"
- "made a purchase"
- "joined newsletter"
large_number: 1234567890123456789
married: true
name: "John Doe"
null_example: null
preferences:
languages:
- "en"
- "es"
- "fr"
newsletter: false
notifications:
email: true
push: true
sms: false
properties:
-
garden: true
rooms:
-
height: 15
name: "Living Room"
width: 20
-
height: 12
name: "Kitchen"
width: 15
-
height: 16
name: "Master Bedroom"
width: 18
size: 2400
swimmingPool: null
type: "House"
-
features:
- "Autopilot"
- "Electric"
- "Touchscreen"
make: "Tesla"
model: "Model S"
type: "Car"
year: 2020
transactions:
-
amount: 450.75
completed: true
currency: "USD"
id: "txn_001"
items:
-
name: "Laptop"
price: 1200
quantity: 1
-
name: "Mouse"
price: 25.5
quantity: 2
-
amount: 99.99
completed: false
currency: "USD"
id: "txn_002"
items:
-
name: "Headphones"
price: 99.99
quantity: 1
work:
position: "Software Engineer"
remote: false
skills:
-
experience: 10
name: "C++"
projects:
- "Compiler"
- "Game Engine"
-
experience: 7
name: "Python"
projects:
- "Machine Learning"
- "Web Scraping"
***********************
example N.11
***********************
GC
address:
city: "Springfield"
coordinates:
latitude: 39.7817
longitude: -89.6501
postalCode: 62704
state: "IL"
street: "1234 Elm Street"
age: 35
boolean_false: false
boolean_true: true
children:
0:
age: 10
hobbies:
0: "reading"
1: "drawing"
2: "cycling"
name: "Jane Doe"
1:
age: 8
hobbies:
0: "video games"
1: "swimming"
2: "football"
name: "Johnny Doe"
float_example: 12345.7
history:
0: "created account"
1: "updated profile"
2: "added new property"
3: "made a purchase"
4: "joined newsletter"
large_number: 1234567890123456789
married: true
name: "John Doe"
null_example: null
preferences:
languages:
0: "en"
1: "es"
2: "fr"
newsletter: false
notifications:
email: true
push: true
sms: false
properties:
0:
garden: true
rooms:
0:
height: 15
name: "Living Room"
width: 20
1:
height: 12
name: "Kitchen"
width: 15
2:
height: 16
name: "Master Bedroom"
width: 18
size: 2400
swimmingPool: null
type: "House"
1:
features:
0: "Autopilot"
1: "Electric"
2: "Touchscreen"
make: "Tesla"
model: "Model S"
type: "Car"
year: 2020
transactions:
0:
amount: 450.75
completed: true
currency: "USD"
id: "txn_001"
items:
0:
name: "Laptop"
price: 1200
quantity: 1
1:
name: "Mouse"
price: 25.5
quantity: 2
1:
amount: 99.99
completed: false
currency: "USD"
id: "txn_002"
items:
0:
name: "Headphones"
price: 99.99
quantity: 1
work:
position: "Software Engineer"
remote: false
skills:
0:
experience: 10
name: "C++"
projects:
0: "Compiler"
1: "Game Engine"
1:
experience: 7
name: "Python"
projects:
0: "Machine Learning"
1: "Web Scraping"
YAML
address:
city: "Springfield"
coordinates:
latitude: 39.7817
longitude: -89.6501
postalCode: 62704
state: "IL"
street: "1234 Elm Street"
age: 35
boolean_false: false
boolean_true: true
children:
-
age: 10
hobbies: [ "reading", "drawing", "cycling" ]
name: "Jane Doe"
-
age: 8
hobbies: [ "video games", "swimming", "football" ]
name: "Johnny Doe"
float_example: 12345.7
history: [ "created account", "updated profile", "added new property", "made a purchase", "joined newsletter" ]
large_number: 1234567890123456789
married: true
name: "John Doe"
null_example: null
preferences:
languages: [ "en", "es", "fr" ]
newsletter: false
notifications:
email: true
push: true
sms: false
properties:
-
garden: true
rooms:
-
height: 15
name: "Living Room"
width: 20
-
height: 12
name: "Kitchen"
width: 15
-
height: 16
name: "Master Bedroom"
width: 18
size: 2400
swimmingPool: null
type: "House"
-
features: [ "Autopilot", "Electric", "Touchscreen" ]
make: "Tesla"
model: "Model S"
type: "Car"
year: 2020
transactions:
-
amount: 450.75
completed: true
currency: "USD"
id: "txn_001"
items:
-
name: "Laptop"
price: 1200
quantity: 1
-
name: "Mouse"
price: 25.5
quantity: 2
-
amount: 99.99
completed: false
currency: "USD"
id: "txn_002"
items:
-
name: "Headphones"
price: 99.99
quantity: 1
work:
position: "Software Engineer"
remote: false
skills:
-
experience: 10
name: "C++"
projects: [ "Compiler", "Game Engine" ]
-
experience: 7
name: "Python"
projects: [ "Machine Learning", "Web Scraping" ]
ALL DONE!
***********************
example N.12
***********************
YAML
matrix_complex:
- [ (4,5), (0,0), (0,0), (0,0) ]
- [ (0,0), (0,0), (1,0), (0,0) ]
matrix_int:
- [ 0, 0, 0 ]
- [ 0, 0, 4 ]
- [ 0, 0, 0 ]
- [ 0, 0, 0 ]
matrix_real:
- [ 0, 0, 0 ]
- [ 0, 0, 2 ]
vector_complex: [ (1,0), (55,1), (0,-2) ]
ALL DONE!
***********************
example N.13
***********************
GC
address:
city: "Springfield"
coordinates:
latitude: 39.7817
longitude: -89.6501
postalCode: 62704
state: "IL"
street: "1234 Elm Street"
age: 35
boolean_false: false
boolean_true: true
children:
0:
age: 10
hobbies:
0: "reading"
1: "drawing"
2: "cycling"
name: "Jane Doe"
1:
age: 8
hobbies:
0: "video games"
1: "swimming"
2: "football"
name: "Johnny Doe"
float_example: 12345.7
history:
0: "created account"
1: "updated profile"
2: "added new property"
3: "made a purchase"
4: "joined newsletter"
large_number: 1234567890123456789
married: true
name: "John Doe"
null_example: null
preferences:
languages:
0: "en"
1: "es"
2: "fr"
newsletter: false
notifications:
email: true
push: true
sms: false
properties:
0:
garden: true
rooms:
0:
height: 15
name: "Living Room"
width: 20
1:
height: 12
name: "Kitchen"
width: 15
2:
height: 16
name: "Master Bedroom"
width: 18
size: 2400
swimmingPool: null
type: "House"
1:
features:
0: "Autopilot"
1: "Electric"
2: "Touchscreen"
make: "Tesla"
model: "Model S"
type: "Car"
year: 2020
transactions:
0:
amount: 450.75
completed: true
currency: "USD"
id: "txn_001"
items:
0:
name: "Laptop"
price: 1200
quantity: 1
1:
name: "Mouse"
price: 25.5
quantity: 2
1:
amount: 99.99
completed: false
currency: "USD"
id: "txn_002"
items:
0:
name: "Headphones"
price: 99.99
quantity: 1
work:
position: "Software Engineer"
remote: false
skills:
0:
experience: 10
name: "C++"
projects:
0: "Compiler"
1: "Game Engine"
1:
experience: 7
name: "Python"
projects:
0: "Machine Learning"
1: "Web Scraping"
YAML
address:
city: "Springfield"
coordinates:
latitude: 39.7817
longitude: -89.6501
postalCode: 62704
state: "IL"
street: "1234 Elm Street"
age: 35
boolean_false: false
boolean_true: true
children:
-
age: 10
hobbies: [ "reading", "drawing", "cycling" ]
name: "Jane Doe"
-
age: 8
hobbies: [ "video games", "swimming", "football" ]
name: "Johnny Doe"
float_example: 12345.7
history: [ "created account", "updated profile", "added new property", "made a purchase", "joined newsletter" ]
large_number: 1234567890123456789
married: true
name: "John Doe"
null_example: null
preferences:
languages: [ "en", "es", "fr" ]
newsletter: false
notifications:
email: true
push: true
sms: false
properties:
-
garden: true
rooms:
-
height: 15
name: "Living Room"
width: 20
-
height: 12
name: "Kitchen"
width: 15
-
height: 16
name: "Master Bedroom"
width: 18
size: 2400
swimmingPool: null
type: "House"
-
features: [ "Autopilot", "Electric", "Touchscreen" ]
make: "Tesla"
model: "Model S"
type: "Car"
year: 2020
transactions:
-
amount: 450.75
completed: true
currency: "USD"
id: "txn_001"
items:
-
name: "Laptop"
price: 1200
quantity: 1
-
name: "Mouse"
price: 25.5
quantity: 2
-
amount: 99.99
completed: false
currency: "USD"
id: "txn_002"
items:
-
name: "Headphones"
price: 99.99
quantity: 1
work:
position: "Software Engineer"
remote: false
skills:
-
experience: 10
name: "C++"
projects: [ "Compiler", "Game Engine" ]
-
experience: 7
name: "Python"
projects: [ "Machine Learning", "Web Scraping" ]
JSON
{
"address":
{
"city": "Springfield",
"coordinates":
{
"latitude": 39.7817,
"longitude": -89.6501
},
"postalCode": 62704,
"state": "IL",
"street": "1234 Elm Street"
},
"age": 35,
"boolean_false": false,
"boolean_true": true,
"children":
[
{
"age": 10,
"hobbies": [ "reading", "drawing", "cycling" ],
"name": "Jane Doe"
},
{
"age": 8,
"hobbies": [ "video games", "swimming", "football" ],
"name": "Johnny Doe"
}
],
"float_example": 12345.7,
"history": [ "created account", "updated profile", "added new property", "made a purchase", "joined newsletter" ],
"large_number": 1234567890123456789,
"married": true,
"name": "John Doe",
"null_example": null,
"preferences":
{
"languages": [ "en", "es", "fr" ],
"newsletter": false,
"notifications":
{
"email": true,
"push": true,
"sms": false
}
},
"properties":
[
{
"garden": true,
"rooms":
[
{
"height": 15,
"name": "Living Room",
"width": 20
},
{
"height": 12,
"name": "Kitchen",
"width": 15
},
{
"height": 16,
"name": "Master Bedroom",
"width": 18
}
],
"size": 2400,
"swimmingPool": null,
"type": "House"
},
{
"features": [ "Autopilot", "Electric", "Touchscreen" ],
"make": "Tesla",
"model": "Model S",
"type": "Car",
"year": 2020
}
],
"transactions":
[
{
"amount": 450.75,
"completed": true,
"currency": "USD",
"id": "txn_001",
"items":
[
{
"name": "Laptop",
"price": 1200,
"quantity": 1
},
{
"name": "Mouse",
"price": 25.5,
"quantity": 2
}
]
},
{
"amount": 99.99,
"completed": false,
"currency": "USD",
"id": "txn_002",
"items":
[
{
"name": "Headphones",
"price": 99.99,
"quantity": 1
}
]
}
],
"work":
{
"position": "Software Engineer",
"remote": false,
"skills":
[
{
"experience": 10,
"name": "C++",
"projects": [ "Compiler", "Game Engine" ]
},
{
"experience": 7,
"name": "Python",
"projects": [ "Machine Learning", "Web Scraping" ]
}
]
}
}
ALL DONE!
***********************
example N.14
***********************
TEST N.1
Original container is:
a: 2
b:
[ 1 2 3 4 5 ]
bb:
[ 4.5 9.08695e-21 ]
c: false
d:
asd:
0: [ 0 1 2 4 ]
1:
0: "1+2i"
1: "3.4"
2: "34i"
e:
0 2.2
1 3
f: null
g:
0: 3
1: true
Json string is:
{
"a": 2,
"b": [ 1, 2, 3, 4, 5 ],
"bb": [ 4.5, 9.08695e-21 ],
"c": false,
"d":
{
"asd":
[
[ 0, 1, 2, 4 ],
[ "1+2i", "3.4", "34i" ]
]
},
"e": [
[ 0, 1 ],
[ 2.2, 3 ]
],
"f": null,
"g":
[
3,
true
]
}
Re-converted container is (note complex string are converted to complex numbers):
a: 2
b:
[ 1 2 3 4 5 ]
bb:
[ 4.5 9.08695e-21 ]
c: false
d:
asd:
0: [ 0 1 2 4 ]
1:
0: "1+2i"
1: "3.4"
2: "34i"
e:
0 2.2
1 3
f: null
g:
[ 3 1 ]
The container from the json string is:
0:
_id: "5a0ae30d8419c393f642fec3"
about: "Qui ad eu officia commodo aute dolor proident ea esse fugiat deserunt sint anim incididunt. Cupidatat ipsum tempor ipsum cillum laborum eu culpa eiusmod laborum quis irure in proident. Amet ipsum aute nulla et. Ipsum sit velit cillum in consequat. Est exercitation deserunt ad Lorem laborum occaecat mollit cupidatat fugiat quis sunt elit voluptate."
address: "769 Prospect Avenue, Snyderville, North Dakota, 3198"
age: 26
balance: "$1,949.87"
company: "MANGLO"
email: "sargentfrazier@manglo.com"
eyeColor: "green"
favoriteFruit: "strawberry"
friends:
0:
id: 0
name: "April Dunlap"
1:
id: 1
name: "Deirdre Mayer"
2:
id: 2
name: "Bernadette Durham"
gender: "male"
greeting: "Hello, Sargent Frazier! You have 7 unread messages."
guid: "d0268ff7-cde2-48e4-9c75-5740c53c3b23"
index: 0
isActive: true
latitude: -38.2436
longitude: -0.862908
name: "Sargent Frazier"
phone: "+1 (894) 561-3896"
picture: "http://placehold.it/32x32"
registered: "2016-01-07T03:21:06 -01:00"
tags:
0: "sunt"
1: "voluptate"
2: "labore"
3: "sunt"
4: "elit"
5: "cupidatat"
6: "nulla"
1:
_id: "5a0ae30da2e6848d6f374bba"
about: "Adipisicing amet veniam dolore in exercitation consequat consectetur cupidatat enim non. Sint minim velit deserunt in aliqua excepteur nostrud ea cupidatat fugiat excepteur mollit consequat. Tempor do minim qui qui labore cupidatat."
address: "922 Dahill Road, Byrnedale, Marshall Islands, 1410"
age: 26
balance: "$2,690.13"
company: "INSOURCE"
email: "vickieroy@insource.com"
eyeColor: "blue"
favoriteFruit: "banana"
friends:
0:
id: 0
name: "Riddle Burt"
1:
id: 1
name: "Hughes Howell"
2:
id: 2
name: "Mcbride Tyson"
gender: "female"
greeting: "Hello, Vickie Roy! You have 3 unread messages."
guid: "578ab333-ea26-40c2-a130-04d47aa9000d"
index: 1
isActive: true
latitude: -13.0974
longitude: -144.934
name: "Vickie Roy"
phone: "+1 (996) 421-2072"
picture: "http://placehold.it/32x32"
registered: "2016-12-20T05:28:05 -01:00"
tags:
0: "quis"
1: "duis"
2: "do"
3: "magna"
4: "qui"
5: "deserunt"
6: "nostrud"
2:
_id: "5a0ae30df49a05d7a259f116"
about: "Eu eiusmod nulla incididunt eu mollit et id elit nisi velit Lorem. Id Lorem in fugiat proident dolor. Exercitation elit Lorem ipsum pariatur duis do consectetur ex laboris incididunt. Exercitation nisi sit ea ea ullamco. Excepteur ipsum duis et id excepteur."
address: "240 Homecrest Avenue, Groveville, Alaska, 3106"
age: 25
balance: "$3,503.13"
company: "ISOLOGIA"
email: "delacruzschultz@isologia.com"
eyeColor: "brown"
favoriteFruit: "strawberry"
friends:
0:
id: 0
name: "Romero Hodge"
1:
id: 1
name: "Dona Reilly"
2:
id: 2
name: "Earlene Richards"
gender: "male"
greeting: "Hello, Delacruz Schultz! You have 9 unread messages."
guid: "84f91917-7331-441d-aa3c-da08994bc1a9"
index: 2
isActive: true
latitude: -7.84276
longitude: -166.809
name: "Delacruz Schultz"
phone: "+1 (949) 553-3319"
picture: "http://placehold.it/32x32"
registered: "2016-02-14T03:02:53 -01:00"
tags:
0: "velit"
1: "esse"
2: "ad"
3: "laborum"
4: "incididunt"
5: "ex"
6: "fugiat"
3:
_id: "5a0ae30d47367b43a9f4e819"
about: "Consequat consectetur minim est in incididunt. Sunt enim voluptate amet consectetur voluptate enim id. Laborum incididunt pariatur consequat qui sint nisi aliquip aliquip consequat nostrud excepteur. Commodo ipsum officia sint pariatur voluptate officia minim occaecat eiusmod commodo ut ipsum consequat excepteur."
address: "454 George Street, Austinburg, Iowa, 8682"
age: 28
balance: "$3,221.56"
company: "ACCUPRINT"
email: "cashcannon@accuprint.com"
eyeColor: "blue"
favoriteFruit: "strawberry"
friends:
0:
id: 0
name: "Burch Cherry"
1:
id: 1
name: "Bray Roberts"
2:
id: 2
name: "Bridgette Hester"
gender: "male"
greeting: "Hello, Cash Cannon! You have 3 unread messages."
guid: "8192649f-8fc0-481d-a32a-50c6919d10c0"
index: 3
isActive: true
latitude: 33.5285
longitude: 57.9276
name: "Cash Cannon"
phone: "+1 (990) 410-3156"
picture: "http://placehold.it/32x32"
registered: "2015-07-11T02:59:53 -02:00"
tags:
0: "officia"
1: "labore"
2: "sit"
3: "mollit"
4: "dolore"
5: "labore"
6: "elit"
4:
_id: "5a0ae30d97744a9d693c381b"
about: "Ipsum ut aliqua qui nisi quis incididunt dolore fugiat. Lorem qui pariatur occaecat reprehenderit laboris nulla eiusmod. Ut sunt sint nostrud incididunt anim sint. Aliquip magna velit enim exercitation proident qui enim amet ullamco pariatur commodo Lorem. Veniam amet in aliqua mollit sint sit ex."
address: "578 Autumn Avenue, Stagecoach, California, 1739"
age: 29
balance: "$3,717.56"
company: "DUFLEX"
email: "jennymendoza@duflex.com"
eyeColor: "brown"
favoriteFruit: "banana"
friends:
0:
id: 0
name: "Marla Macias"
1:
id: 1
name: "Lauri Adkins"
2:
id: 2
name: "Coleman Keller"
gender: "female"
greeting: "Hello, Jenny Mendoza! You have 1 unread messages."
guid: "71e9af8c-8c30-4810-b4d0-92a4c6fd434c"
index: 4
isActive: true
latitude: -1.13319
longitude: -77.0049
name: "Jenny Mendoza"
phone: "+1 (864) 549-3766"
picture: "http://placehold.it/32x32"
registered: "2014-09-25T09:34:35 -02:00"
tags:
0: "laborum"
1: "officia"
2: "eu"
3: "aute"
4: "et"
5: "aliqua"
6: "eu"
TEST N.2
Original container is:
0: 1
1: [ 0 0 123 0 0 0 0 0 0 0 ]
2:
_id: "5a0ae30df49a05d7a259f116"
aaa: "stringa1"
about: "Eu eiusmod nulla incididunt eu mollit et id elit nisi velit Lorem. Id Lorem in fugiat proident dolor. Exercitation elit Lorem ipsum pariatur duis do consectetur ex laboris incididunt. Exercitation nisi sit ea ea ullamco. Excepteur ipsum duis et id excepteur."
address: "240 Homecrest Avenue, Groveville, Alaska, 3106"
age: 25
balance: "$3,503.13"
bbb: "stringa2"
company: "ISOLOGIA"
email: "delacruzschultz@isologia.com"
eyeColor: "brown"
favoriteFruit: "strawberry"
friends:
0:
id: 0
name: "Romero Hodge"
1:
id: 1
name: "Dona Reilly"
2:
id: 2
name: "Earlene Richards"
gender: "male"
greeting: "Hello, Delacruz Schultz! You have 9 unread messages."
guid: "84f91917-7331-441d-aa3c-da08994bc1a9"
index: 2
isActive: true
latitude: -7.84276
longitude: -166.809
name: "Delacruz Schultz"
paperino: 3
phone: "+1 (949) 553-3319"
picture: "http://placehold.it/32x32"
pippo: 13
pluto: 1
registered: "2016-02-14T03:02:53 -01:00"
tags:
0: "velit"
1: "esse"
2: "ad"
3: "laborum"
4: "incididunt"
5: "ex"
6: "fugiat"
3:
0: "string1"
1: "string2"
2: "string3"
3: "string4"
4: 1.3
5: "pippo"
6:
aaa: 123
bbb: 3.4
vector:
[ 12 10 1 ]
7:
0: 123
1: 3.14
2: "nonna papera"
3: null
8: true
9: null
Json string is:
[
1,
[ 0, 0, 123, 0, 0, 0, 0, 0, 0, 0 ],
{
"_id": "5a0ae30df49a05d7a259f116",
"aaa": "stringa1",
"about": "Eu eiusmod nulla incididunt eu mollit et id elit nisi velit Lorem. Id Lorem in fugiat proident dolor. Exercitation elit Lorem ipsum pariatur duis do consectetur ex laboris incididunt. Exercitation nisi sit ea ea ullamco. Excepteur ipsum duis et id excepteur.",
"address": "240 Homecrest Avenue, Groveville, Alaska, 3106",
"age": 25,
"balance": "$3,503.13",
"bbb": "stringa2",
"company": "ISOLOGIA",
"email": "delacruzschultz@isologia.com",
"eyeColor": "brown",
"favoriteFruit": "strawberry",
"friends":
[
{
"id": 0,
"name": "Romero Hodge"
},
{
"id": 1,
"name": "Dona Reilly"
},
{
"id": 2,
"name": "Earlene Richards"
}
],
"gender": "male",
"greeting": "Hello, Delacruz Schultz! You have 9 unread messages.",
"guid": "84f91917-7331-441d-aa3c-da08994bc1a9",
"index": 2,
"isActive": true,
"latitude": -7.84276,
"longitude": -166.809,
"name": "Delacruz Schultz",
"paperino": 3,
"phone": "+1 (949) 553-3319",
"picture": "http://placehold.it/32x32",
"pippo": 13,
"pluto": 1,
"registered": "2016-02-14T03:02:53 -01:00",
"tags": [ "velit", "esse", "ad", "laborum", "incididunt", "ex", "fugiat" ]
},
[ "string1", "string2", "string3", "string4" ],
1.3,
"pippo",
{
"aaa": 123,
"bbb": 3.4,
"vector": [ 12, 10, 1 ]
},
[
123,
3.14,
"nonna papera",
null
],
true,
null
]
Re-converted container is (note complex string are converted to complex numbers):
0: 1
1: [ 0 0 123 0 0 0 0 0 0 0 ]
2:
_id: "5a0ae30df49a05d7a259f116"
aaa: "stringa1"
about: "Eu eiusmod nulla incididunt eu mollit et id elit nisi velit Lorem. Id Lorem in fugiat proident dolor. Exercitation elit Lorem ipsum pariatur duis do consectetur ex laboris incididunt. Exercitation nisi sit ea ea ullamco. Excepteur ipsum duis et id excepteur."
address: "240 Homecrest Avenue, Groveville, Alaska, 3106"
age: 25
balance: "$3,503.13"
bbb: "stringa2"
company: "ISOLOGIA"
email: "delacruzschultz@isologia.com"
eyeColor: "brown"
favoriteFruit: "strawberry"
friends:
0:
id: 0
name: "Romero Hodge"
1:
id: 1
name: "Dona Reilly"
2:
id: 2
name: "Earlene Richards"
gender: "male"
greeting: "Hello, Delacruz Schultz! You have 9 unread messages."
guid: "84f91917-7331-441d-aa3c-da08994bc1a9"
index: 2
isActive: true
latitude: -7.84276
longitude: -166.809
name: "Delacruz Schultz"
paperino: 3
phone: "+1 (949) 553-3319"
picture: "http://placehold.it/32x32"
pippo: 13
pluto: 1
registered: "2016-02-14T03:02:53 -01:00"
tags:
0: "velit"
1: "esse"
2: "ad"
3: "laborum"
4: "incididunt"
5: "ex"
6: "fugiat"
3:
0: "string1"
1: "string2"
2: "string3"
3: "string4"
4: 1.3
5: "pippo"
6:
aaa: 123
bbb: 3.4
vector:
[ 12 10 1 ]
7:
0: 123
1: 3.14
2: "nonna papera"
3: null
8: true
9: null
The container from the json string is:
0:
_id: "5a0ae30d8419c393f642fec3"
about: "Qui ad eu officia commodo aute dolor proident ea esse fugiat deserunt sint anim incididunt. Cupidatat ipsum tempor ipsum cillum laborum eu culpa eiusmod laborum quis irure in proident. Amet ipsum aute nulla et. Ipsum sit velit cillum in consequat. Est exercitation deserunt ad Lorem laborum occaecat mollit cupidatat fugiat quis sunt elit voluptate."
address: "769 Prospect Avenue, Snyderville, North Dakota, 3198"
age: 26
balance: "$1,949.87"
company: "MANGLO"
email: "sargentfrazier@manglo.com"
eyeColor: "green"
favoriteFruit: "strawberry"
friends:
0:
id: 0
name: "April Dunlap"
1:
id: 1
name: "Deirdre Mayer"
2:
id: 2
name: "Bernadette Durham"
gender: "male"
greeting: "Hello, Sargent Frazier! You have 7 unread messages."
guid: "d0268ff7-cde2-48e4-9c75-5740c53c3b23"
index: 0
isActive: true
latitude: -38.2436
longitude: -0.862908
name: "Sargent Frazier"
phone: "+1 (894) 561-3896"
picture: "http://placehold.it/32x32"
registered: "2016-01-07T03:21:06 -01:00"
tags:
0: "sunt"
1: "voluptate"
2: "labore"
3: "sunt"
4: "elit"
5: "cupidatat"
6: "nulla"
1:
_id: "5a0ae30da2e6848d6f374bba"
about: "Adipisicing amet veniam dolore in exercitation consequat consectetur cupidatat enim non. Sint minim velit deserunt in aliqua excepteur nostrud ea cupidatat fugiat excepteur mollit consequat. Tempor do minim qui qui labore cupidatat."
address: "922 Dahill Road, Byrnedale, Marshall Islands, 1410"
age: 26
balance: "$2,690.13"
company: "INSOURCE"
email: "vickieroy@insource.com"
eyeColor: "blue"
favoriteFruit: "banana"
friends:
0:
id: 0
name: "Riddle Burt"
1:
id: 1
name: "Hughes Howell"
2:
id: 2
name: "Mcbride Tyson"
gender: "female"
greeting: "Hello, Vickie Roy! You have 3 unread messages."
guid: "578ab333-ea26-40c2-a130-04d47aa9000d"
index: 1
isActive: true
latitude: -13.0974
longitude: -144.934
name: "Vickie Roy"
phone: "+1 (996) 421-2072"
picture: "http://placehold.it/32x32"
registered: "2016-12-20T05:28:05 -01:00"
tags:
0: "quis"
1: "duis"
2: "do"
3: "magna"
4: "qui"
5: "deserunt"
6: "nostrud"
2:
_id: "5a0ae30df49a05d7a259f116"
about: "Eu eiusmod nulla incididunt eu mollit et id elit nisi velit Lorem. Id Lorem in fugiat proident dolor. Exercitation elit Lorem ipsum pariatur duis do consectetur ex laboris incididunt. Exercitation nisi sit ea ea ullamco. Excepteur ipsum duis et id excepteur."
address: "240 Homecrest Avenue, Groveville, Alaska, 3106"
age: 25
balance: "$3,503.13"
company: "ISOLOGIA"
email: "delacruzschultz@isologia.com"
eyeColor: "brown"
favoriteFruit: "strawberry"
friends:
0:
id: 0
name: "Romero Hodge"
1:
id: 1
name: "Dona Reilly"
2:
id: 2
name: "Earlene Richards"
gender: "male"
greeting: "Hello, Delacruz Schultz! You have 9 unread messages."
guid: "84f91917-7331-441d-aa3c-da08994bc1a9"
index: 2
isActive: true
latitude: -7.84276
longitude: -166.809
name: "Delacruz Schultz"
phone: "+1 (949) 553-3319"
picture: "http://placehold.it/32x32"
registered: "2016-02-14T03:02:53 -01:00"
tags:
0: "velit"
1: "esse"
2: "ad"
3: "laborum"
4: "incididunt"
5: "ex"
6: "fugiat"
3:
_id: "5a0ae30d47367b43a9f4e819"
about: "Consequat consectetur minim est in incididunt. Sunt enim voluptate amet consectetur voluptate enim id. Laborum incididunt pariatur consequat qui sint nisi aliquip aliquip consequat nostrud excepteur. Commodo ipsum officia sint pariatur voluptate officia minim occaecat eiusmod commodo ut ipsum consequat excepteur."
address: "454 George Street, Austinburg, Iowa, 8682"
age: 28
balance: "$3,221.56"
company: "ACCUPRINT"
email: "cashcannon@accuprint.com"
eyeColor: "blue"
favoriteFruit: "strawberry"
friends:
0:
id: 0
name: "Burch Cherry"
1:
id: 1
name: "Bray Roberts"
2:
id: 2
name: "Bridgette Hester"
gender: "male"
greeting: "Hello, Cash Cannon! You have 3 unread messages."
guid: "8192649f-8fc0-481d-a32a-50c6919d10c0"
index: 3
isActive: true
latitude: 33.5285
longitude: 57.9276
name: "Cash Cannon"
phone: "+1 (990) 410-3156"
picture: "http://placehold.it/32x32"
registered: "2015-07-11T02:59:53 -02:00"
tags:
0: "officia"
1: "labore"
2: "sit"
3: "mollit"
4: "dolore"
5: "labore"
6: "elit"
4:
_id: "5a0ae30d97744a9d693c381b"
about: "Ipsum ut aliqua qui nisi quis incididunt dolore fugiat. Lorem qui pariatur occaecat reprehenderit laboris nulla eiusmod. Ut sunt sint nostrud incididunt anim sint. Aliquip magna velit enim exercitation proident qui enim amet ullamco pariatur commodo Lorem. Veniam amet in aliqua mollit sint sit ex."
address: "578 Autumn Avenue, Stagecoach, California, 1739"
age: 29
balance: "$3,717.56"
company: "DUFLEX"
email: "jennymendoza@duflex.com"
eyeColor: "brown"
favoriteFruit: "banana"
friends:
0:
id: 0
name: "Marla Macias"
1:
id: 1
name: "Lauri Adkins"
2:
id: 2
name: "Coleman Keller"
gender: "female"
greeting: "Hello, Jenny Mendoza! You have 1 unread messages."
guid: "71e9af8c-8c30-4810-b4d0-92a4c6fd434c"
index: 4
isActive: true
latitude: -1.13319
longitude: -77.0049
name: "Jenny Mendoza"
phone: "+1 (864) 549-3766"
picture: "http://placehold.it/32x32"
registered: "2014-09-25T09:34:35 -02:00"
tags:
0: "laborum"
1: "officia"
2: "eu"
3: "aute"
4: "et"
5: "aliqua"
6: "eu"
All done Folks!
***********************
example N.15
***********************
READ JSON to GC1 0 millisecondi.
READ JSON to GC2 0 millisecondi.
COMPARE GC1 vs GC2: SERIALIZE [111] bytes 0 millisecondi.
DE-SERIALIZE to GC3 [111] bytes 0 millisecondi.
COMPARE GC1 vs GC3:
All done Folks!
***********************
example N.16
***********************
READ JSON
WRITE YAML
READ YAML
WRITE YAML
READ YAML
All done Folks!
***********************
example N.17
***********************
gc --> 1
gc --> 23
All done Folks!
***********************
example N.18
***********************
READ TOML
WRITE TOML
[ard]
communication_mode = 'tcp'
laps = 10
racetrack = 'Mugello_3D'
real_time_factor = -1.0
synchronous = true
[ard.agent.high_level]
closed_loop = false
cycle_time_us = 50000
problem = 'ard_3d_vx_vy_F142MFL_Mugello_3D'
standalone = true
[ard.agent.high_level.mlt]
laps = 1.0
[ard.agent.high_level.mpc]
allow_non_convergence = true
horizon = 300.0
timeout_ms = 0
use_mlt_solution = false
virtual_horizon = 0.0
[ard.agent.low_level]
cockpit = true
cycle_time_us = 1000
[ard.simulator]
cycle_time_us = 1000
[broker]
backend_ipc = 'ipc:///tmp/broker_backend.ipc'
backend_tcp = 'tcp://127.0.0.1:5556'
capture_ipc = 'ipc:///tmp/broker_capture.ipc'
capture_tcp = 'tcp://127.0.0.1:5557'
frontend_ipc = 'ipc:///tmp/broker_frontend.ipc'
frontend_tcp = 'tcp://127.0.0.1:5555'
io_threads = 1
[logger]
capture_mode = 'tcp'
mongo_db = 'ard'
mongo_uri = 'mongodb://127.0.0.1:27017'
plotter_tcp = 'tcp://127.0.0.1:9872'
schemas_dir = 'third_party/DrivingSimulatorInterfaces/schemas'
worker_threads = 1
[manager]
rcvtimeo = 1000
sndtimeo = 1000
[manager.high_level]
pull = 'tcp://127.0.0.1:5559'
push = 'tcp://127.0.0.1:5558'
[manager.low_level]
pull = 'tcp://127.0.0.1:5561'
push = 'tcp://127.0.0.1:5560'
[manager.simulator]
pull = 'tcp://127.0.0.1:5563'
push = 'tcp://127.0.0.1:5562'
[rerun]
rerun_app_id = 'ard'
rerun_endpoint = '127.0.0.1:9876'
rerun_recording_id = 'ard'
stream = trueAssume we have this GC to copy from:
Paperino: 32.9
Pippo: 9
Pluto: 7.7
merge:
Paperino: 32.9
Pippo: 9
Pluto: 7.7
into:
KeyNotPresentInOtherGC: "ciao"
Paperino: 2.9
Pippo: 3
Pluto: 0.7
result:
KeyNotPresentInOtherGC: "ciao"
Paperino: 32.9
Pippo: 9
Pluto: 7.7
copy:
Paperino: 32.9
Pippo: 9
Pluto: 7.7
into:
KeyNotPresentInOtherGC: "ciao"
Paperino: 32.9
Pippo: 9
Pluto: 7.7
result:
Paperino: 32.9
Pippo: 9
Pluto: 7.7
All done Folks!