TestsTested | ✓ |
LangLanguage | C++C++ |
License | MIT |
ReleasedLast Release | Apr 2016 |
Maintained by Siarhei Fedartsou.
Usage is very similar to NSJSONSerialization
:
id object = [YATWSerialization YAMLObjectWithData:data options:0 error:nil]
Currently we have two options:
YATWSerializationOptionsScalarAutomaticConversion
- automatically recognizes number or bool scalars and returns them with NSNumber type(by the way we don't support YAML type tags yet)YATWSerializationOptionsScalarAllowSameKeys
- allows maps with same keys like this:spring:
datasource:
url: test
spring:
main:
headless: true
In this case this yaml will be represented as array of dictionaries, but not dictionary, in Objective C. If this flag is not specified then deserializer returns dictionary with arbitrary object from list of objects with the same keys.
YAMLThatWorks is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "YAMLThatWorks"
Siarhei Fiedartsou, [email protected]
YAMLThatWorks is available under the MIT license. See the LICENSE file for more info.