Skip to content

Commit 5eb8306

Browse files
committed
Fix typos
1 parent 4a015b3 commit 5eb8306

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

doc/files/JSON-PROPERTY-ARRAY.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Only allows arrays.
1010

1111
Once you have instantiated the 'JSONPropertyArray' class, you can set restrictions on the size of the array via the 'set_min_size' and 'set_max_size' methods. The values that these functions receive as parameters are inclusive. To remove any restriction, you can use the 'remove_min_size' and 'remove_max_size' methods.
1212

13-
You can also determine what kind of elements can be part of this array via the 'set_element_property' method, which receives a JSONProperty object as a parameter. Otherwise, the array would accept any type of data. You can return to the default behavior using the 'remove_element_property'.
13+
You can also determine what kind of elements can be part of this array via the 'set_element_property' method, which receives a 'JSONProperty' object as a parameter. Otherwise, the array would accept any type of data. You can return to the default behavior using the 'remove_element_property'.
1414

1515
Finally, you can determine if you want each element of the array to be unique via the 'set_uniqueness' method and passing 'true' as its first parameter. When the array contains dictionaries, it would only check if the 'unique_key', the second parameter of this method, values of the dictionaries are equal. By default, the 'unique_key' string is empty. In this case, it would compare all the fields of the dictionaries.
1616

@@ -189,8 +189,8 @@ Returned error:
189189
{
190190
"error": JSONProperty.Errors.WRONG_TYPE,
191191
"expected": JSONProperty.Types.OBJECT,
192-
"context": "furniture/[2]",
193-
"as_text": "Wrong type: expected 'object', at 'furniture/[2]'."
192+
"context": "furniture[2]",
193+
"as_text": "Wrong type: expected 'object', at 'furniture[2]'."
194194
}
195195
]
196196
```

doc/files/JSON-PROPERTY-COLOR.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ Returned error:
103103
[
104104
{
105105
"error": JSONProperty.Errors.COLOR_WRONG_TYPE,
106-
"context": "color/[0]",
107-
"as_text": "Wrong type: expected 'integer' in the range [0, 255], at 'color/[0]'."
106+
"context": "color[0]",
107+
"as_text": "Wrong type: expected 'integer' in the range [0, 255], at 'color[0]'."
108108
}
109109
]
110110
```
@@ -126,8 +126,8 @@ Returned error:
126126
{
127127
"error": JSONProperty.Errors.COLOR_OUT_OF_RANGE,
128128
"value": 256,
129-
"context": "color/[0]",
130-
"as_text": "256 is out of the range [0, 255], at 'color/[0]'."
129+
"context": "color[0]",
130+
"as_text": "256 is out of the range [0, 255], at 'color[0]'."
131131
}
132132
]
133133
```

doc/files/JSON-PROPERTY-JSON-CONFIG-FILE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ Returned error:
124124
{
125125
"error": JSONProperty.Errors.WRONG_TYPE,
126126
"expected": JSONProperty.Types.NUMBER,
127-
"context": "json_file/number",
128-
"as_text": "Wrong type: expected 'number', at 'json_file/number'."
127+
"context": "json_file.number",
128+
"as_text": "Wrong type: expected 'number', at 'json_file.number'."
129129
}
130130
]
131131
```

doc/files/JSON-PROPERTY-OBJECT.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Only allows dictionaries.
88

99
## Usage
1010

11-
First, once you have instantiated the 'JSONPropertyObject' class, you can add new properties by using the 'add_property' method, which requires the property name and a JSONProperty object as its parameters. By default, any new property is obligatory. If you want to make it optional, you must include 'false' as the third parameter. The fourth parameter is the default value that the property would take if the input does not specify this property. Any default value must pass the tests of this property. Otherwise, it would not be accepted.
11+
First, once you have instantiated the 'JSONPropertyObject' class, you can add new properties by using the 'add_property' method, which requires the property name and a 'JSONProperty' object as its parameters. By default, any new property is obligatory. If you want to make it optional, you must include 'false' as the third parameter. The fourth parameter is the default value that the property would take if the input does not specify this property. Any default value must pass the tests of this property. Otherwise, it would not be accepted.
1212

1313
After adding all the properties, you can create exclusivity and dependency relationships between them. You can not establish these relations with obligatory properties, so every property must be optional.
1414

@@ -94,8 +94,8 @@ Returned errors:
9494
{
9595
"error": JSONProperty.Errors.WRONG_TYPE,
9696
"expected": JSONProperty.Types.INTEGER,
97-
"context": "person/age",
98-
"as_text": "Wrong type: expected 'integer', at 'person/age'."
97+
"context": "person.age",
98+
"as_text": "Wrong type: expected 'integer', at 'person.age'."
9999
},
100100
{
101101
"error": JSONProperty.Errors.OBJECT_NON_VALID_PROPERTY,

0 commit comments

Comments
 (0)