Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Need a common supertype for JsonArray and JsonObject. Otherwise, the object model API
      has two "top level" types and that looks odd. A common type would make it easy to pass
      JSON text around. The changes would be:

      public interface JsonText {
      }

      public interface JsonArray extends JsonValue, JsonText {
      }

      public interface JsonObject extends JsonValue, JsonText {
      }

      public class JsonBuilder {

      public static interface JsonBuildable<T extends JsonText>

      { ..}

      ...
      }

      public class JsonWriter implements Closeable {
      public void write(JsonText value)

      { ... }
      }

      public class JsonReader implements Closeable {
      public JsonText read() { ... }

      }

      Can also use JsonDocument instead of JsonText, but JsonText is preferred as it is
      used by grammar.

      Perhaps, we also need to add START_TEXT, END_TEXT parser events.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            jitu
            Reporter:
            jitu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: