extracting schema from json correctly