=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/util/ImportMetaDataTask.java' --- dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/util/ImportMetaDataTask.java 2013-03-16 14:22:03 +0000 +++ dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/util/ImportMetaDataTask.java 2013-03-20 11:24:42 +0000 @@ -73,13 +73,20 @@ try { - // TODO check for XML/JSON + // TODO should probably sniff if its xml or json, but this works for now metaData = JacksonUtils.fromXml( inputStream, MetaData.class ); } - catch ( IOException e ) + catch ( IOException ignored ) { - log.error( "(IOException) Unable to parse meta-data while reading input stream" ); - return; + try + { + metaData = JacksonUtils.fromJson( inputStream, MetaData.class ); + } + catch ( IOException e ) + { + log.error( "(IOException) Unable to parse meta-data while reading input stream" ); + return; + } } importService.importMetaData( userUid, metaData, importOptions, taskId );