-
-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on generation of nested objects in array #78
Comments
Thanks! Does anyone have time to submit a patch? I'm a bit swamped this week and next. |
I take a look at the code, and I don't know which "merge/duplicate"strategy you want to use : should B be a struct with B1,B2,B3,B4 or should we have two structures BFirst {B1, B2} BSecond {B3,B4} ? The second strategy (name it "duplicate") seems easier to implement as we could image B struct and B_uuidv4() struct as you already do. For my case I wanted the first strategy ("merge") but that would mean a deep merge. This would end up with weird behaviour if we have nested array in the nested objects. In my case I was on a structure like this: {
"stores": [{
"sign": "wallmart",
"address": {
"street": "1st street",
"zipcode": "123456",
"city": "randomCity1",
"phone": "1234567890"
}
},
{
"sign": "bestbuy",
"address": {
"street": "2nd street",
"zipcode": "654321",
"city": "randomCity2"
}
}
]
} and it seems pretty obvious that in this case, addresses structs should be merged. In other less well-structured jsons, we would like to end up with two structures So basically in which direction would you like to go? |
Similar issue with key-value in json. Ex:
Should be
Instead of
|
Found a little issue on substructures in nested objects in array.
For example :
will generate:
The text was updated successfully, but these errors were encountered: