restructured query to json converters