class_docstr: Output single-line JSON objects.
  Carries over extra fields from the input.
class_docstr_tok: ["Output","single-line","JSON","objects",".","Carries","over","extra","fields","from","the","input","."]
docstr: Outputs a JSON object of the fields in the `TranslatorOutput` object.
docstr_tok: ["Outputs","a","JSON","object","of","the","fields","in","the","`","TranslatorOutput","`","object","."]
code: def handle(
      self,
      t_input: inference.TranslatorInput,
      t_output: inference.TranslatorOutput,
      t_walltime: float = 0.0,
  ):
      """
      Outputs a JSON object of the fields in the `TranslatorOutput` object.
      """
      d_ = t_output.json()
      print(
          json.dumps(d_, sort_keys=True), file=self.stream, flush=True
      )
  
imports: import json
  import sys
  from abc import ABC, abstractmethod
  from itertools import chain
  from typing import Optional
  import sockeye.constants
  from sockeye.utils import smart_open
  from .None import inference
label_desc: Use image node_id 2 for calling the JSONOutputHandler obj's underlying member method code with example usage: obj.handle(t_input, t_output, t_walltime) without return types