Package com.orientechnologies.orient.core.serialization.serializer

Examples of com.orientechnologies.orient.core.serialization.serializer.OJSONWriter.endObject()


         json.writeAttribute(4, false, "delete", role.allow(rule.getKey(), ORole.PERMISSION_DELETE));
         json.endObject(4, true);
       }
       json.endCollection(3, false);

       json.endObject(2, true);
     }
     json.endCollection(1, true);

     json.beginObject(1, true, "config");
View Full Code Here


       for (OStorageEntryConfiguration entry : db.getStorage().getConfiguration().properties) {
         if (entry != null) {
           json.beginObject(3, true, null);
           json.writeAttribute(4, false, "name", entry.name);
           json.writeAttribute(4, false, "value", entry.value);
           json.endObject(3, true);
         }
       }
     json.endCollection(2, true);

     json.endObject(1, true);
View Full Code Here

           json.endObject(3, true);
         }
       }
     json.endCollection(2, true);

     json.endObject(1, true);
     json.endObject();
     json.flush();

     iResponse.send(OHttpUtils.STATUS_OK_CODE, "OK", OHttpUtils.CONTENT_JSON, buffer.toString(), null);
   }
View Full Code Here

         }
       }
     json.endCollection(2, true);

     json.endObject(1, true);
     json.endObject();
     json.flush();

     iResponse.send(OHttpUtils.STATUS_OK_CODE, "OK", OHttpUtils.CONTENT_JSON, buffer.toString(), null);
   }
View Full Code Here

      } else

        throw new OSerializationException("Error on marshalling record of type '" + iRecord.getClass()
            + "' to JSON. The record type cannot be exported to JSON");

      json.endObject(0, true);

      iOutput.append(buffer);
      return iOutput;
    } catch (IOException e) {
      throw new OSerializationException("Error on marshalling of record to JSON", e);
View Full Code Here

       final String databaseName = args.length > 1 && args[1].length() > 0 ? args[1] : null;

       writeConnections(json, databaseName);

       json.endObject();

       iResponse.send(OHttpUtils.STATUS_OK_CODE, "OK", OHttpUtils.CONTENT_JSON, jsonBuffer.toString(), null);

     } finally {
     }
View Full Code Here

       writeConnections(json, null);
       writeDatabases(json);
       writeStorages(json);
       writeProperties(json);

       json.endObject();

       iResponse.send(OHttpUtils.STATUS_OK_CODE, "OK", OHttpUtils.CONTENT_JSON, jsonBuffer.toString(), null);

     } finally {
     }
View Full Code Here

       json.writeAttribute("osName", System.getProperty("os.name"));
       json.writeAttribute("osVersion", System.getProperty("os.version"));
       json.writeAttribute("osArch", System.getProperty("os.arch"));
       json.writeAttribute("javaVendor", System.getProperty("java.vm.vendor"));
       json.writeAttribute("javaVersion", System.getProperty("java.vm.version"));
       json.endObject();

       if (db.getMetadata().getSchema().getClasses() != null) {
         json.beginCollection("classes");
         List<String> classNames = new ArrayList<String>();
View Full Code Here

             json.writeAttribute("maxSize", "-");
             json.writeAttribute("files", "-");
           } catch (Exception e) {
             json.writeAttribute("records", "? (Unauthorized)");
           }
           json.endObject();
         }
         json.endCollection();
       }

       if (db.getUser() != null) {
View Full Code Here

           // Exclude index size because it's too costly
           // json.writeAttribute("size", index.getSize());
         } catch (Exception e) {
           OLogManager.instance().error(this, "Cannot serialize index configuration", e);
         }
         json.endObject();
       }
       json.endCollection();

       json.beginObject("config");
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.