# tf.raw_ops.DecodeJSONExample

<br />

Convert JSON-encoded Example records to binary protocol buffer strings.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.raw_ops.DecodeJSONExample`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/DecodeJSONExample)

<br />

    tf.raw_ops.DecodeJSONExample(
        json_examples, name=None
    )

> [!NOTE]
> **Note:** This is **not** a general purpose JSON parsing op.

This op converts JSON-serialized
[`tf.train.Example`](https://www.tensorflow.org/versions/r2.14/api_docs/python/tf/train/Example) (created with `json_format.MessageToJson`, following the
[standard JSON mapping](https://developers.google.com/protocol-buffers/docs/proto3#json))
to a binary-serialized [`tf.train.Example`](https://www.tensorflow.org/versions/r2.14/api_docs/python/tf/train/Example) (equivalent to
[`Example.SerializeToString()`](https://www.tensorflow.org/versions/r2.14/api_docs/python/tf/train/BytesList#SerializeToString)) suitable for conversion to tensors with
[`tf.io.parse_example`](https://www.tensorflow.org/versions/r2.14/api_docs/python/tf/io/parse_example).

<br />

<br />

<br />

| ## Args ||
|---|---|
| `json_examples` | A `Tensor` of type `string`. Each string is a JSON object serialized according to the JSON mapping of the Example proto. |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Tensor` of type `string`. ||

<br />