Skip to content

Commit 7c9f631

Browse files
committed
Minor tweaks
1 parent 791a412 commit 7c9f631

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

reference/constraints/Json.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Json
2+
====
23

3-
Validates that a value is valid ``json``. Specifically, this checks to see if
4-
the value is a valid ``json`` or not.
4+
Validates that a value has valid `JSON`_ syntax.
55

66
+----------------+-----------------------------------------------------------------------+
77
| Applies to | :ref:`property or method <validation-property-target>` |
@@ -17,9 +17,7 @@ the value is a valid ``json`` or not.
1717
Basic Usage
1818
-----------
1919

20-
The ``Json`` constraint can be applied to a property or a "getter" method,
21-
but is most commonly useful in the latter case. For example, suppose that
22-
you want to guarantee that some ``jsonString`` property is valid JSON.
20+
The ``Json`` constraint can be applied to a property or a "getter" method:
2321

2422
.. configuration-block::
2523

@@ -60,7 +58,7 @@ you want to guarantee that some ``jsonString`` property is valid JSON.
6058
<class name="App\Entity\Book">
6159
<property name="chapters">
6260
<constraint name="Json">
63-
<option name"message">You've entered an invalid Json.</option>
61+
<option name="message">You've entered an invalid Json.</option>
6462
</constraint>
6563
</property>
6664
</class>
@@ -94,6 +92,8 @@ message
9492

9593
**type**: ``string`` **default**: ``This value should be valid JSON.``
9694

97-
This message is shown if the underlying data is not a valid JSON.
95+
This message is shown if the underlying data is not a valid JSON value.
9896

9997
.. include:: /reference/constraints/_payload-option.rst.inc
98+
99+
.. _`JSON`: https://en.wikipedia.org/wiki/JSON

0 commit comments

Comments
 (0)