Skip to content

Conversation

@KarlOfDuty
Copy link

@KarlOfDuty KarlOfDuty commented Nov 2, 2024

Changes the exception message Could not find member '{0}' on object of type '{1}' to The JSON property '{0}' does not exist on object of type '{1}'

The existing message is not very clear about if the problem is a missing property in the JSON string or if it is missing in the .NET object.

The new message is more clear that a JSON property exists and it does not correspond to a member on the .NET object.

While this is not too difficult to figure out for a developer well versed in the library, in my use case I show these messages to administrators who are likely thinking that "Could not find" means they have to add that thing to the json string they entered.

Also, my editor removed some trailing spaces as you can see in the diffs. Let me know if you want me to undo those whitespace changes.

The existing message "Could not find member '{0}' on object of type '{1}'" is not very clear if the problem is a missing property in the JSON string or if it is missing in the .NET object.

The new message "The JSON property '{0}' does not exist on object of type '{1}'" is more clear that there IS a JSON property but there is no corresponding member on the .NET object.
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

Successfully merging this pull request may close these issues.

1 participant