code: def decode_json(data, specs, name=None):
      """
      Decode JSON string into Tensors.
  
      Args:
          data: A String Tensor. The JSON strings to decode.
          specs: A structured TensorSpecs describing the signature
          of the JSON elements.
          name: A name for the operation (optional).
  
      Returns:
          A structured Tensors.
      """
      # TODO: support batch (1-D) input
      # Make a copy of specs to keep the original specs
      named = tf.nest.map_structure(
          lambda e: _NamedTensorSpec(e.shape, e.dtype), specs
      )
      named_spec(named)
      named = tf.nest.flatten(named)
      names = [e.named() for e in named]
      shapes = [
          tf.constant(
              [-1 if d is None else d for d in e.shape.as_list()],
              tf.int32,
          )
          for e in named
      ]
      dtypes = [e.dtype for e in named]
  
      values = core_ops.io_decode_json(data, names, dtypes, name=name)
      values = [
          tf.reshape(value, shape)
          for value, shape in zip(values, shapes)
      ]
      return tf.nest.pack_sequence_as(specs, values)
  
file_path: io/tensorflow_io/python/experimental/serialization_ops.py
imports: import json
  import tensorflow
  from tensorflow_io.python.ops import core_ops
label_desc: Use image node_id 2 for calling a global function with example usage: decode_json(data, specs, name) and returns: tf