-
Notifications
You must be signed in to change notification settings - Fork 54
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
Expected a string but was BEGIN_OBJECT at line 1 column 2 #140
Comments
Hello, Sorry for the late response.
If you have a json with |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello. I am using gwt-jackson. Parsing an object like
{"name":"VALUE"}
I get an error "Error at line 1 and column 2 of input <{"name": "AUSTRIA"}>.I am trying to parse it into enum object like:
Here is the mapper:
public interface CountryMapper extends ObjectMapper<Countries>{}
Mapper creation:
CountryMapper mapper = GWT.create(CountryMapper.class);
and
Countries country = mapper.read("{\"name\": \"AUSTRIA\"}");
I have tried without property, getter and setter in the enum - this also didn't help. The only way to parse it is to create a proxy model with string property and first parse json to that model.
I suppose the issue is in the enum.
What would be your suggestion? What do I do wrong?
The text was updated successfully, but these errors were encountered: