You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's no way to automatically convert meaningful (but arbitrary) strings into BOOLs. However, you can use the mapping callback to handle this yourself quite easily.
Thanks @zcharter. You can also write your own stringToBoolean mapping class which conforms to JTValidMappingKey and transform that string to your expected value.
I have JSON like this
"login_success" : "Yes",
"isAdult": "N",
...
and
I want to mapping the result to below property
property BOOL bSuccess;
property BOOL isAudlt;
currently, the result map to the NSString property and then call method if the string is "YES" , bSuccess = YES...
is there any easy way?
The text was updated successfully, but these errors were encountered: