Skip to content

Unexpected Token ' JSON #2

Description

@mehs2690

The parse() not working when the Java class includes special characters as ' or |

For example, the following class not working with java-model because has special characters:

public class SpecialCharacters {
  char[] specialCharacters = {'\'','/','$',&','@'};

  public void showSymbols() {
    for(int i =0; i < specialCharacters.length; i++) {
      System.out.println("the symbol is: " + specialCharacters[i]);
    }
  } 
}

At the moment, just the class that has "single quote" the java-model parse failed and the error "could not parse file SpecialCharacters.java: Unexpected token ' in JSON at position 34"

If more information is needed, I'd be happy to share it as soon as possible.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions