-
Notifications
You must be signed in to change notification settings - Fork 54
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
Arrays of objects #42
Comments
Would entertain a PR for this. Also will add that you can post process such objects into arrays in your own code in the event that the default hash behavior is not adequate for your needs. In this case, we had to pick something to support for brackets with a value in them and I think we support array index without additional brackets after (per the readme) but we could make an improvement there. |
Yeah, right now I'm post processing the data since I needed it done quickly, but I'll look into it when I have more time next week and get it in so that I won't have to do additional processing for future use cases. |
Currently struggling with this same issue. Not sure I'm up to the task but maybe? But perhaps @RangerMauve has something brewing. I'd be very pleased. (that having been said... post-proc working fine afaik) |
@IanRr I've added a post processing hook in my code, and I happen to rely on JSON-Schema so I know which parts of my form needs to be an array of objects. Sadly I'm a bit too busy to work on this and actually don't need it for my main projects at the moment. From doing a quick review of the code, the change needs to be done around here where you'd need to set the existing key to an array. Might also need to look around here |
I have something that looks like this:
This is being parsed as
Since the keys are numbers, I would have expected it to parse it as an array, as so:
I think this is a reasonable setting to use since numeric keys are already used for arrays of strings.
Would a PR for this change be welcome?
The text was updated successfully, but these errors were encountered: