Skip to content
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

Any way to add a nested object? #14

Open
adherr opened this issue Jun 27, 2019 · 1 comment
Open

Any way to add a nested object? #14

adherr opened this issue Jun 27, 2019 · 1 comment

Comments

@adherr
Copy link

adherr commented Jun 27, 2019

I'm trying to build up a JSON document hash starting from {}. I keep ending up here when I add a nested path. I see the problem -- you can't know whether applying the patch {"op": "add", "path": "/foo/0", "value": "bar"} to {} should yield

{"foo": {"0": "bar"}}

or

{"foo": ["bar"]}

However, for paths with all non-numeric segments there should be no confusion.

Is there a way to add a nested element with Hana that I can't see? Is it reasonable to think of adding support for this?

@tenderlove
Copy link
Owner

Is there a way to add a nested element with Hana that I can't see?

No. Not that I know of.

Is it reasonable to think of adding support for this?

Yes, I think so. But add the test here so that all implementations will get the behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants