Package com.couchbase.client.java.document.json

Examples of com.couchbase.client.java.document.json.JsonObject.toMap()


    public static DesignDocument from(final String name, final JsonObject raw) {
        final List<View> views = new ArrayList<View>();
        JsonObject rawViews = raw.getObject("views");
        if (rawViews != null) {
           for(Map.Entry<String, Object> entry : rawViews.toMap().entrySet()) {
               String viewName = entry.getKey();
               JsonObject viewContent = (JsonObject) entry.getValue();
               String map = viewContent.getString("map");
               String reduce = viewContent.getString("reduce");
               views.add(DefaultView.create(viewName, map, reduce));
View Full Code Here


    public static DesignDocument from(final String name, final JsonObject raw) {
        final List<View> views = new ArrayList<View>();
        JsonObject rawViews = raw.getObject("views");
        if (rawViews != null) {
           for(Map.Entry<String, Object> entry : rawViews.toMap().entrySet()) {
               String viewName = entry.getKey();
               JsonObject viewContent = (JsonObject) entry.getValue();
               String map = viewContent.getString("map");
               String reduce = viewContent.getString("reduce");
               views.add(DefaultView.create(viewName, map, reduce));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.