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
I generated the Model classes from JSON. Apparently, tool has generic type as 'AnyObject'.
If some fields has null value in JSON, it will be exported as 'AnyObject' for Swift- struct -Codable format.
Problem: Xcode 9.2 does not allow to build the project with 'AnyObject' type properties in Codable structs. I am getting the following build time error:
No 'decodeIfPresent' candidates produce the expected contextual result type 'AnyObject?
The text was updated successfully, but these errors were encountered:
In Swift-Struct-Codable format 'decodeIfPresent' cannot
produce value of type 'Anyobject'. So changing geberic-type
from 'AnyObject'to 'String' for null json values will
allow to compile the xcode project
FixesAhmed-Ali#105
* origin/master: (75 commits)
Fixed an issue with trying to figure the selected language from an UI element outside the UI thread
nit: removing empty line
Adding Outlaw JSON file to the project as the merge conflicts caused this to not to merge correctly
Updating CHANGELOG.md
Fixing the project file
Updating CHANGELOG.md
Updating CHANGELOG.md
Updating CHANGELOG.md
Updating CHANGELOG.md
Updating CHANGELOG.md
Updating CHANGELOG.md
Updating GHANGELOG.md for release 1.0.9
Update to Swift 4.2
Fix: float type issue
Java Gson for Android: Fix method name to be "optString" instead of "opt" to get String type value from JSONObject in constructor.
Change generic type from 'AnyObject' to 'String' -> FixesAhmed-Ali#105
added back credit file
Added Swift-Codable-Struct with forced unwrapped option
Migrate to Swift 4
fix a complier error in SwiftyJSON - Class
...
# Conflicts:
# .gitignore
# JSONExport.xcodeproj/project.pbxproj
# JSONExport/Supported Languages/Swift-Mappable.json
In Swift-Struct-Codable format 'decodeIfPresent' cannot
produce value of type 'Anyobject'. So changing geberic-type
from 'AnyObject'to 'String' for null json values will
allow to compile the xcode project
Fixes#105
I generated the Model classes from JSON. Apparently, tool has generic type as '
AnyObject
'.If some fields has null value in JSON, it will be exported as '
AnyObject
' for Swift- struct -Codable format.Problem: Xcode 9.2 does not allow to build the project with '
AnyObject
' type properties inCodable
structs. I am getting the following build time error:No 'decodeIfPresent' candidates produce the expected contextual result type 'AnyObject?
The text was updated successfully, but these errors were encountered: