aspnet / JsonPatch

[Archived] JSON PATCH library. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
103 stars 48 forks source link

allow paths that contain '.' #125

Closed arerlend closed 6 years ago

arerlend commented 6 years ago

fixes #124

JSON Patch spec as found at jsonpatch.com never specifies that '.' character are invalid. Several major REST APIs with HTTP Patch endpoints use paths that contain '.' characters.

dnfclas commented 6 years ago

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request. Thanks, .NET Foundation Pull Request Bot

dnfclas commented 6 years ago

@arerlend, Thanks for your contribution. To ensure that the project team has proper rights to use your work, please complete the Contribution License Agreement at https://cla2.dotnetfoundation.org.

It will cover your contributions to all .NET Foundation-managed open source projects. Thanks, .NET Foundation Pull Request Bot

dnfclas commented 6 years ago

@arerlend, thanks for signing the contribution license agreement. We will now validate the agreement and then the pull request.
Thanks, .NET Foundation Pull Request Bot

arerlend commented 6 years ago

@Eilon

rynowak commented 6 years ago

Looks good to me also. Merging.

I think the intent from the original code was to catch errors from accidentally creating a JSON patch path from a C# expression like x => x.Foo.Bar. It should create /Foo/Bar not /Foo.Bar.

rynowak commented 6 years ago

@arerlend Thanks!