I am facing a problem when parsing expedia result. The result JSON differs according to the number of rooms available. In case multiple rooms are available, array is returned, otherwise only single object.
I am using case-classes for parsing the JSON, however I don't know what type to use to match both cases with the field (right now I am using something like List[Room], this fails in case one object is returned only).
Is there a way to catch this using case-classes only? If no, what other solution would you suggest?
Thanks,
Matej