Skip to content

Default Values

Anton edited this page Jun 14, 2017 · 2 revisions

When there is need to fallback to a default value for optional or non-optional properties, define a default value by appending default to the property definition in the model mapping. In the example below, if the response dictionary does not have a value for the open property while mapping, it will default to false.

JSON: /Model/Mappings/Business.json PLIST: /Mappings/Business.plist