Code example for Properties

Methods: setProperty

0
         
        writer.endObject();
    } 
     
    public void write(JSONWriter jsonWriter) throws Exception {
        Properties options = new Properties();
        options.setProperty("mode", "save");
 
        write(jsonWriter, options);
    } 
     
    static public ProjectMetadata loadFromJSON(JSONObject obj) {
        ProjectMetadata pm = new ProjectMetadata(JSONUtilities.getDate(obj, "modified", new Date()));
 
        pm._modified = JSONUtilities.getDate(obj, "modified", new Date());
        pm._name = JSONUtilities.getString(obj, "name", "<Error recovering project name>");
        pm._password = JSONUtilities.getString(obj, "password", "");
 
        pm._encoding = JSONUtilities.getString(obj, "encoding", "");
        pm._encodingConfidence = JSONUtilities.getInt(obj, "encodingConfidence", 0);