From 8e1ed8edc262debd02b8ee87e1d7323ff937800e Mon Sep 17 00:00:00 2001 From: Bryan Mulvihill Date: Sun, 5 Aug 2018 20:34:06 -0400 Subject: [PATCH] Fix typo in serialization docs --- src/json/serialization.cr | 2 +- src/yaml/serialization.cr | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/json/serialization.cr b/src/json/serialization.cr index 2e44cd0a1efa..017c1f2d0a61 100644 --- a/src/json/serialization.cr +++ b/src/json/serialization.cr @@ -61,7 +61,7 @@ module JSON # * **key**: the value of the key in the json object (by default the name of the instance variable) # * **root**: assume the value is inside a JSON object with a given key (see `Object.from_json(string_or_io, root)`) # * **converter**: specify an alternate type for parsing and generation. The converter must define `from_json(JSON::PullParser)` and `to_json(value, JSON::Builder)` as class methods. Examples of converters are `Time::Format` and `Time::EpochConverter` for `Time`. - # * **presense**: if `true`, a `@{{key}}_present` instance variable will be generated when the key was present (even if it has a `null` value), `false` by default + # * **presence**: if `true`, a `@{{key}}_present` instance variable will be generated when the key was present (even if it has a `null` value), `false` by default # * **emit_null**: if `true`, emits a `null` value for nilable property (by default nulls are not emitted) # # Deserialization also respects default values of variables: diff --git a/src/yaml/serialization.cr b/src/yaml/serialization.cr index 1db40b55744e..6686326c99e3 100644 --- a/src/yaml/serialization.cr +++ b/src/yaml/serialization.cr @@ -60,7 +60,7 @@ module YAML # * **ignore**: if `true` skip this field in seriazation and deserialization (by default false) # * **key**: the value of the key in the yaml object (by default the name of the instance variable) # * **converter**: specify an alternate type for parsing and generation. The converter must define `from_yaml(YAML::PullParser)` and `to_yaml(value, YAML::Builder)` as class methods. Examples of converters are `Time::Format` and `Time::EpochConverter` for `Time`. - # * **presense**: if `true`, a `@{{key}}_present` instance variable will be generated when the key was present (even if it has a `null` value), `false` by default + # * **presence**: if `true`, a `@{{key}}_present` instance variable will be generated when the key was present (even if it has a `null` value), `false` by default # * **emit_null**: if `true`, emits a `null` value for nilable property (by default nulls are not emitted) # # Deserialization also respects default values of variables: