Method: Merge::Ats::PaginatedCandidateList.from_json
- Defined in:
- lib/merge_ruby_client/ats/types/paginated_candidate_list.rb
.from_json(json_object:) ⇒ Merge::Ats::PaginatedCandidateList
Deserialize a JSON object to an instance of PaginatedCandidateList
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/merge_ruby_client/ats/types/paginated_candidate_list.rb', line 43 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) next_ = parsed_json["next"] previous = parsed_json["previous"] results = parsed_json["results"]&.map do |item| item = item.to_json Merge::Ats::Candidate.from_json(json_object: item) end new( next_: next_, previous: previous, results: results, additional_properties: struct ) end |