-
-
Notifications
You must be signed in to change notification settings - Fork 796
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
Add support for 'missing values' in JSON arrays #52
Comments
I think someone earlier requested to allow optional trailing comma; although not sure what would be expected semantics. With this change, it would result in a null value there. This might be easy enough to support, either way; and perhaps even have separate features (allow empty values in arrays as nulls; allow extra trailing comma). |
+1 for this feature, I see in quite often in different JSON APIs. Note that javascript handles such cases quite inconsistent:
Will be interpreted as:
|
+1 |
Got here from http://jira.codehaus.org/browse/JACKSON-618 Specifically for a trailing command I would expect it to be ignored with some sort of ALLOW_TRAILING_COMMA option. I don't have any expectations for the [,,,"foo",,,] shorthand. |
I think we need a separate issue for Even with trailing comma, there is question of semantics -- I am guessing that most would consider it something to basically ignore, but theoretical alternative would be to consider it a short-hand for ",null" construct. But then again, that would only work for arrays and not JSON Objects, so it would not be consistent. |
Fair enough, trailing case broken off to : #118 |
Got question or request for Feature to be added.
I have json object that does not follow json standard.
Example
[,,"41513053","30120.00",]
I have no control over the json only that I receive it.
I understand why the developers did it. ( to preserve bandwith ).
[null,null,"41513053","30120.00",null]
So I get ' com.fasterxml.jackson.core.JsonParseException: Unexpected
character (',' (code 44)): expected a valid value (number, String,
array, object, 'true', 'false' or 'null')'
It would be a nice feature to except this as null value.
JsonParser.Feature.ALLOW_NULL_EMPTY_VALUES.
The text was updated successfully, but these errors were encountered: