On this page
tf.raw_ops.DecodeJSONExample
Convert JSON-encoded Example records to binary protocol buffer strings.
tf.raw_ops.DecodeJSONExample(
json_examples, name=None
)
Note: This is not a general purpose JSON parsing op.
This op converts JSON-serialized tf.train.Example
(created with json_format.MessageToJson
, following the standard JSON mapping) to a binary-serialized tf.train.Example
(equivalent to Example.SerializeToString()
) suitable for conversion to tensors with tf.io.parse_example
.
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). |
Returns | |
---|---|
A Tensor of type string . |
© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.9/api_docs/python/tf/raw_ops/DecodeJSONExample