Skip to content

Commit a226fc9

Browse files
committed
[schema] initial support of json-schema, jdict adds schema support
1 parent 5034423 commit a226fc9

5 files changed

Lines changed: 1709 additions & 86 deletions

File tree

gendocs.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ print_help()
1717
print_group()
1818
{
1919
for fun in $@
20-
do
20+
do
2121
print_help $fun.m
2222
done
2323
echo ''
@@ -30,7 +30,9 @@ func_ubjson="loadubjson saveubjson"
3030
func_msgpack="loadmsgpack savemsgpack"
3131
func_space="jsave jload"
3232
func_interface="loadjd savejd"
33-
func_mmap="jsonget jsonset getfromjsonpath filterjsonmmap"
33+
func_jdict="jdict"
34+
func_schema="jsonschema"
35+
func_mmap="jsonget jsonset jsonpath filterjsonmmap"
3436
func_zip="zlibencode zlibdecode gzipencode gzipdecode lzmaencode lzmadecode
3537
lzipencode lzipdecode lz4encode lz4decode lz4hcencode lz4hcdecode
3638
base64encode base64decode encodevarname decodevarname"
@@ -58,6 +60,12 @@ print_group $func_space
5860
echo %%=== "#" Interface ===
5961
print_group $func_interface
6062

63+
echo %%=== "#" JDict ===
64+
print_group $func_jdict
65+
66+
echo %%=== "#" JSON Schema ===
67+
print_group $func_schema
68+
6169
echo %%=== "#" Memory-map ===
6270
print_group $func_mmap
6371

jdataencode.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
newitem = jdict(newitem);
136136

137137
for i = 1:length(attrpath)
138-
attr = item.getattr(attrpath{i}).v();
138+
attr = item.getattr(attrpath{i});
139139
attrname = keys(attr);
140140
for j = 1:length(attrname)
141141
if (strcmp(attrname{j}, 'dims'))

0 commit comments

Comments
 (0)