Hi, Was there a change on the REST APIs recently?...
# ory-network
c
Hi, Was there a change on the REST APIs recently? My Android App is failing just after login when trying to do a session.toJson() to save it on the Keychain. This is affecting both the published app (Java SDK v1.2.5) and the development environment (Java SDK v1.2.9). The error shown is "java.lang.IllegalStateException: Not a JSON Object: null", which means it is encountering a null where there shouldn't be one. I noticed the new tokenization parameter but changing it from null to an empty string does not correct the error.
h
@narrow-van-43826
n
We added a new optional
organization_id
field to the identity recently. However, existing clients should just ignore that field. We released a new Java SDK v1.2.10 yesterday that includes that field. Which error are you getting exactly?
c
I updated the Java SDK to v1.2.10 and it works ok now. The error I was getting was "java.lang.IllegalStateException: Not a JSON Object: null" when calling the function ".toJson()" from a "Session" object. This usually means the JSON parser is in some kind of "strict mode" and is finding a key on the json string that is not defined in the expected class, thus throwing an error. I compared SDK v1.2.9 vs 1.2.10 and found the definition of organization_id on the Identity class on the latter but not on the former. There must be some kind of flag that could be added to the OpenAPI generator to prevent this in the future. Just an extra FYI, we generate the Swift SDK ourselves and it is working fine with v1.2.5