Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-801

Add Javadoc to JsonObject.create(JsopTokenizer)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 0.7
    • 0.11
    • mk
    • None

    Description

      When browsing code, I was surprised to find a factory method JsonObject.create(JsopTokenizer), which operates on a tokenizer that is expected to be in some post-initialisation state. I.e. the following doesn't work:

      JsonObject.create(new JsopTokenizer("{}"));
      

      This does:

      JsonObject.create(new JsopTokenizer("}"));
      

      I understand that the goal of this method is to be used in larger JSON parsing contexts, where JsopTokenizer has already consumed a '{'. Since JsonObject is public and OSGi-exported, I think this method deserves at least some Javadoc.

      It might be better, of course, to provide a more predictable / reusable API.

      Attachments

        Activity

          People

            jukkaz Jukka Zitting
            lukas.eder Lukas Eder
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: