/** * Reads a table import mapping descriptor from its JSON serialized form. * * @param json JSON string. * @return the decoded table layout descriptor. * @throws IOException on I/O error. */ public static TableImportDescriptorDesc readTableImportDescriptorDescFromJSON(String json) throws IOException { final TableImportDescriptorDesc desc = (TableImportDescriptorDesc) FromJson.fromJsonString(json, TableImportDescriptorDesc.SCHEMA$); return desc; }
/** * Reads a table layout descriptor from its JSON serialized form. * * @param istream JSON input stream. * @return the decoded table layout descriptor. * @throws IOException on I/O error. */ public static TableLayoutDesc readTableLayoutDescFromJSON(InputStream istream) throws IOException { final String json = IOUtils.toString(istream); final TableLayoutDesc desc = (TableLayoutDesc) FromJson.fromJsonString(json, TableLayoutDesc.SCHEMA$); return desc; }