Package org.sourceforge.jsonedit.core.outline.elements

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

TOP

Related Classes of org.sourceforge.jsonedit.core.outline.elements.JsonString

Copyright © 2018 www.massapicom. 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.