Examples of JSONString


Examples of com.sdicons.json.model.JSONString

    @Override
    public JSONValue toJSON(Object aPojo) throws MapperException {
  AjSelectionRange range = (AjSelectionRange) aPojo;
  final JSONObject out = new JSONObject();
  out.getValue().put("from", new JSONString(String.valueOf(range.getFrom())));
  out.getValue().put("to", new JSONString(String.valueOf(range.getTo())));
  return out;
    }
View Full Code Here

Examples of com.voyagegames.core.json.JsonString

 
  private JsonString mStr;

  @Before
  public void setUp() throws Exception {
    mStr = new JsonString(TEST_VALUE, 0, TEST_VALUE.length());
  }
View Full Code Here

Examples of javax.json.JsonString

                result.setExitCode(response.getStatus());
                result.setExitCodeInfo(response.getStatusInfo().toString());
            }
            try {
                JsonObject json = response.readEntity(JsonObject.class);
                JsonString message = json.getJsonString(JSON_OBJECT_MESSAGE);
                if (message != null) {
                    result.setResult(message.toString());
                }
                JsonString exitCode = json.getJsonString("exit_code");
                if (exitCode != null) {
                    if ("SUCCESS".equals(exitCode.getString())) {
                        result.setExitCodeOk();
                    }
                }
            } catch (Exception ex) {
                result.setResult("Could not read result from server.");
View Full Code Here

Examples of org.apache.jena.atlas.json.JsonString

    @Test public void js_write_str_11() { test("\u2001", "\"\\u2001\"") ; }
   
   
    private static void test(String str, String expected)
    {
        JsonValue v = new JsonString(str) ;
        str = v.toString() ;
        assertEquals(expected, str) ;
    }
View Full Code Here

Examples of org.apache.sling.commons.json.JSONString

        put("long", 42L);
        put("boolean", true);
        put("float", 12.34f);
        put("double", 45.67d);
       
        final JSONString js = new JSONString() {
            public String toJSONString() {
                return "json.string here";
            }
           
        };
View Full Code Here

Examples of org.json.JSONString

            final IOException ioe = new IOException(e.getMessage());
            ioe.initCause(e);
            throw ioe;
        }
        if (JSONString.class.isAssignableFrom(type)) {
            return new JSONString() {
                public String toJSONString() {
                    return jsonString;
                }

                @Override
View Full Code Here

Examples of org.openjena.atlas.json.JsonString

    }

    @Override
    public void valueString(String image, long currLine, long currCol)
    {
        value = new JsonString(image) ;
    }
View Full Code Here

Examples of org.sourceforge.jsonedit.core.outline.elements.JsonString

   * @throws JsonReaderException
   * @throws JsonTextOutlineParserException
   */
  private void doJsonValue(String key, int start) throws JsonReaderException, JsonTextOutlineParserException, BadLocationException, BadPositionCategoryException  {
   
    JsonString jsonString = new JsonString(parent, key);
    parent.addChild(jsonString);
    jsonString.setStart(start, doc);
   
    StringBuilder valueBuilder = new StringBuilder();
    char ch;
    do {
      ch = parser.getNextChar();
     
      // TODO check format in values as well.
      if (ch == eof || (ch == quote && parser.getPrevious() != slash)) {
        jsonString.setLength(parser.getPosition() - start + 1);
        ch = parser.getNextClean();
        break;
      }
     
      valueBuilder.append(ch);
    } while (ch != eof);

    jsonString.setValue(valueBuilder.toString());
  }
View Full Code Here

Examples of se.llbit.json.JsonString

            }
            JsonValue jsonValue;
            try {
              jsonValue = new JsonNumber(Integer.parseInt(value));
            } catch (Exception e) {
              jsonValue = new JsonString(value);
            }
            obj.set(path[path.length-1], jsonValue);
            writeSceneJson(file, desc);
            System.out.println("Updated scene " + file.getAbsolutePath());
          } catch (SyntaxError e) {
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.