Skip to content

Commit 8344190

Browse files
Clarify text talking about handling of Any on WKT
This is to address confusion from the wording as raised on protocolbuffers/protobuf#23579 PiperOrigin-RevId: 810512313
1 parent a2aef5b commit 8344190

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

content/programming-guides/json.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,12 @@ The following table shows how data is represented in JSON files.
147147
<td>Any</td>
148148
<td><code>object</code></td>
149149
<td><code>{"@type": "url", "f": v, ... }</code></td>
150-
<td>If the <code>Any</code> contains a value that has a special JSON
151-
mapping, it will be converted as follows: <code>{"@type": xxx, "value":
152-
yyy}</code>. Otherwise, the value will be converted into a JSON object,
153-
and the <code>"@type"</code> field will be inserted to indicate the
154-
actual data type.
150+
<td>If the <code>Any</code> contains a well-known type that has a special
151+
JSON mapping in this table (for example <code>google.protobuf.Duration</code>)
152+
it will be converted as follows: <code>{"@type": xxx, "value":
153+
yyy}</code>. Otherwise, the value will be converted into a JSON object
154+
as usual, and an additional <code>"@type"</code> field will be inserted
155+
with a value of the URL indicating the message's type.
155156
</td>
156157
</tr>
157158
<tr>

0 commit comments

Comments
 (0)