Skip to content

Commit fb5b240

Browse files
committed
update format for table objects
1 parent 21a80af commit fb5b240

File tree

2 files changed

+25
-24
lines changed

2 files changed

+25
-24
lines changed

examples/jsonlab_basictest.matlab

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,7 @@ ans =
11661166
"Hour": 0,
11671167
"Minute": 0,
11681168
"Second": 0,
1169-
"SystemTimeZone": "America\/Los_Angeles"
1169+
"SystemTimeZone": "America\/New_York"
11701170
},
11711171
{
11721172
"Format": "dd-MMM-uuuu",
@@ -1177,7 +1177,7 @@ ans =
11771177
"Hour": 0,
11781178
"Minute": 0,
11791179
"Second": 0,
1180-
"SystemTimeZone": "America\/Los_Angeles"
1180+
"SystemTimeZone": "America\/New_York"
11811181
}
11821182
]
11831183

@@ -1237,33 +1237,34 @@ data2json =
12371237
ans =
12381238

12391239
{
1240-
"table": [
1241-
{
1242-
"Names": [
1243-
"Andy"
1244-
],
1245-
"Age": 21
1246-
},
1247-
{
1248-
"Names": [
1249-
"William"
1240+
"table": {
1241+
"_TableCols_": [
1242+
"Names",
1243+
"Age"
1244+
],
1245+
"_TableRecords_": [
1246+
[
1247+
"Andy",
1248+
21
12501249
],
1251-
"Age": 21
1252-
},
1253-
{
1254-
"Names": [
1255-
"Om"
1250+
[
1251+
"William",
1252+
21
12561253
],
1257-
"Age": 22
1258-
}
1259-
]
1254+
[
1255+
"Om",
1256+
22
1257+
]
1258+
],
1259+
"_TableRows_": []
1260+
}
12601261
}
12611262

12621263

12631264

12641265
json2data =
12651266

1266-
table: {[1x1 struct] [1x1 struct] [1x1 struct]}
1267+
table: [3x2 table]
12671268

12681269
>> >>
12691270
%=================================================

examples/jsonlab_ubjson_basictest.matlab

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ data2json =
725725

726726
ans =
727727

728-
[{UFormatSUdd-MMM-uuuuUTimeZoneSU UYearIßUMonthiUDayiUHouri UMinutei USecondi USystemTimeZoneSUAmerica/Los_Angeles}{UFormatSUdd-MMM-uuuuUTimeZoneSU UYearIßUMonthiUDayi UHouri UMinutei USecondi USystemTimeZoneSUAmerica/Los_Angeles}]
728+
[{UFormatSUdd-MMM-uuuuUTimeZoneSU UYearIßUMonthiUDayiUHouri UMinutei USecondi USystemTimeZoneSUAmerica/New_York}{UFormatSUdd-MMM-uuuuUTimeZoneSU UYearIßUMonthiUDayi UHouri UMinutei USecondi USystemTimeZoneSUAmerica/New_York}]
729729

730730

731731
json2data =
@@ -776,12 +776,12 @@ data2json =
776776

777777
ans =
778778

779-
{Utable[{UNames[SUAndy]UAgei}{UNames[SUWilliam]UAgei}{UNames[SUOm]UAgei}]}
779+
{Utable{U_TableCols_[SUNamesSUAge]U_TableRecords_[[SUAndy[i]][SUWilliam[i]][SUOm[i]]]U_TableRows_Z}}
780780

781781

782782
json2data =
783783

784-
table: {[1x1 struct] [1x1 struct] [1x1 struct]}
784+
table: [3x2 table]
785785

786786
>> >>
787787
%=================================================

0 commit comments

Comments
 (0)