@Override
    public void read(IReaderHandler readerHandler) throws IOException {
        try {
            JsonToken current = jp.nextToken();

            if (current != JsonToken.START_OBJECT) {
                throw new IOException("Expected start object at root."); //$NON-NLS-1$
            }

            while (jp.nextToken() != JsonToken.END_OBJECT) {
                String name = jp.getCurrentName();
                current = jp.nextToken();
                
                if (name.equals("Metadata")) { //$NON-NLS-1$
                    ObjectNode obj = readObjectNode();
                    readerHandler.onMetaData(obj);
                } else if (name.equals("Gateways")) { //$NON-NLS-1$
                    readArrayStart();
                    while (jp.getCurrentToken() == JsonToken.START_OBJECT) {
                        ObjectNode obj = readObjectNode();
                        readerHandler.onGateway(obj);
                        jp.nextToken();
                    }
                } else if (name.equals("Plugins")) { //$NON-NLS-1$
                    readArrayStart();
                    while (jp.getCurrentToken() == JsonToken.START_OBJECT) {
                        ObjectNode obj = readObjectNode();
                        readerHandler.onPlugin(obj);
                        jp.nextToken();
                    }
                } else if (name.equals("Roles")) { //$NON-NLS-1$
                    readArrayStart();
                    while (jp.getCurrentToken() == JsonToken.START_OBJECT) {
                        ObjectNode obj = readObjectNode();
                        readerHandler.onRole(obj);
                        jp.nextToken();
                    }
                } else if (name.equals("PolicyDefinitions")) { //$NON-NLS-1$
                    readArrayStart();
                    while (jp.getCurrentToken() == JsonToken.START_OBJECT) {
                        ObjectNode obj = readObjectNode();
                        readerHandler.onPolicyDefinition(obj);
                        jp.nextToken();
                    }
                } else if (name.equals("Users")) { //$NON-NLS-1$
                    readArrayStart();
                    while (jp.getCurrentToken() == JsonToken.START_OBJECT) {
                        ObjectNode obj = readObjectNode();
                        readerHandler.onUser(obj);
                        jp.nextToken();
                    }
                } else if (name.equals("Orgs")) { //$NON-NLS-1$
                    readArrayStart();
                    while (jp.getCurrentToken() == JsonToken.START_OBJECT) {
                        ObjectNode obj = readObjectNode();
                        readerHandler.onOrg(obj);
                        jp.nextToken();
                    }
                } else if (name.equals("Developers")) { //$NON-NLS-1$
                    readArrayStart();
                    while (jp.getCurrentToken() == JsonToken.START_OBJECT) {
                        ObjectNode obj = readObjectNode();
                        readerHandler.onDeveloper(obj);
                        jp.nextToken();
                    }

                } else if (name.equals("Blobs")) {
                    readArrayStart();
                    while (jp.getCurrentToken() == JsonToken.START_OBJECT) {
                        ObjectNode obj = readObjectNode();
                        readerHandler.onBlob(obj);
                        jp.nextToken();
                    }
                }
            }
        } finally {
            IOUtils.closeQuietly(in);
        }
    }
@see io.apiman.manager.api.migrator.IDataMigratorReader#read(io.apiman.manager.api.migrator.IReaderHandler)
manager/api/migrator/src/main/java/io/apiman/manager/api/migrator/JsonDataMigratorReader.java