Added JSON query deserialization