Method: AssemblyAI::Lemur::LemurQuestionAnswer.from_json
- Defined in:
- lib/assemblyai/lemur/types/lemur_question_answer.rb
.from_json(json_object:) ⇒ AssemblyAI::Lemur::LemurQuestionAnswer
Deserialize a JSON object to an instance of LemurQuestionAnswer
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/assemblyai/lemur/types/lemur_question_answer.rb', line 37 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) question = struct["question"] answer = struct["answer"] new( question: question, answer: answer, additional_properties: struct ) end |