Skip to content

make json parser more robust for unknown properties. #1341#1342

Open
Lokowandtg wants to merge 5 commits intocloudfoundry:mainfrom
Lokowandtg:UnknownProperties
Open

make json parser more robust for unknown properties. #1341#1342
Lokowandtg wants to merge 5 commits intocloudfoundry:mainfrom
Lokowandtg:UnknownProperties

Conversation

@Lokowandtg
Copy link
Contributor

Fixes #1341 by improving the error handling when the JsonCodec detects a parsing error.
When there is a rule configured for the error at hand, the offending element is deleted and parsing of the remaining message is retried. If there is no rule or the retry fails, the problem is written to the log and the normal error handling stays unchanged.

An example configuration is in the integration tests. A configuration to ignore all errors is also provided.

@Kehrlann
Copy link
Contributor

If we ignore all the JSON parsing code, this specific fix is covered by #1340 I think, could you please confirm this?

@Lokowandtg
Copy link
Contributor Author

#1340 fixes the missing features we currently face because cf-java-client is behind.

This change is improving error handling, making it configurable. This allows future incompatibilities to be ignored without touching the code.

So both changes should be merged.

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.

Json Parser is too strict

2 participants