Skip to content
This repository was archived by the owner on Nov 15, 2018. It is now read-only.

Patching of dictionaries should be case sensitive on keys #37

Closed
kichalla opened this issue Sep 27, 2016 · 2 comments
Closed

Patching of dictionaries should be case sensitive on keys #37

kichalla opened this issue Sep 27, 2016 · 2 comments
Assignees
Milestone

Comments

@kichalla
Copy link
Member

kichalla commented Sep 27, 2016

The current code handles all (dynamic(example: ExpandoObject implements IDictionary<string,object>) or not) dictionaries which implement IDictionary<string, object> in a case Insensitive way. This is an incorrect behavior.

For example:

  1. When Json.net deserializes data into a regular IDictionary<,> it considers the keys case-sensitive.
  2. When Json.net deserializes data into a regular Poco type, it considers the property names case-Insensitive.

Considering the above behavior, we should do the following in json patch:

  1. For dynamic types (like ExpandoObject, DynamicObject etc.), the matching of keys should be case-Insensitive. This is to keep the behavior consistent with a Poco type where the property names are considered case-Insensitive.
  2. For dictionaries, keep the default json.net behavior, i.e. keep them case sensitive.

@dougbu @rynowak

@kichalla kichalla added the bug label Sep 27, 2016
@Eilon Eilon added this to the 1.1.0 milestone Nov 3, 2016
@Eilon Eilon added the 1 - Ready label Nov 3, 2016
@jbagga jbagga assigned kichalla and unassigned jbagga Nov 4, 2016
@Eilon
Copy link
Member

Eilon commented Nov 8, 2016

@kichalla can you link to the PR/commit where you previously fixed this and then close this? Thanks!

@kichalla
Copy link
Member Author

81931e7

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

No branches or pull requests

3 participants