MCPcopy Create free account
hub / github.com/google-research/language / to_json

Method to_json

language/xsp/data_preprocessing/sql_utils.py:117–123  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

115 self.utterance_copy = utterance_copy
116
117 def to_json(self):
118 if self.symbol:
119 return {'symbol': self.symbol}
120 if self.entity_copy:
121 return {'entity_copy': self.entity_copy.to_json()}
122 if self.utterance_copy:
123 return {'utterance_copy': self.utterance_copy.to_json()}
124
125 def from_json(self, dictionary):
126 """Converts from a JSON representation to a SQL action."""

Callers

nothing calls this directly

Calls 1

to_jsonMethod · 0.45

Tested by

no test coverage detected