exavolt/onde — Issue #7: array of arrays
Author: cslanzi76
Created: 2012-01-12 11:01:23+00:00
State: open

Looks like a great work!!! Well done!

I just got a main issue, with arrays .. and in particular when an array is containing complex types like as objects or other arrays.

Example.
1. Editing a schema with an array of array, updating to create the form - this works fine
2. Loading the schema - this work fine
3. Editing the data - this work fine
4. Now save both schema and data
5. Load schema and data - this works fine but...
- the second level array of the existing data doesn't allow to add new items, instead it allows to add a property (not following the schema)
- if you specified "required" for the second level array, you can't re-export the same data you loaded

schema.json:

{
"description":"A schema",
"properties":{
"methods":{
"type":"array",
"description":"1st level array",
"items":{
"type":"object",
"description":"The definition",
"properties":{
"parameters":{
"type":"array",
"description":"2nd level array",
"items":"string",
"required": true
}
}
}
}
}
}

data.json:

{
"methods": [
{
"parameters": [
"aa",
"bb"
]
},
{
"parameters": [
"ddd",
"fff"
]
}
]
}

But this is going to be a great tool!!
Christian

PS.
Ah, if you add booleans, when you load the data you get an error, variable valData is not declared, line 540