Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-4884

Provide a new constructor for RelJsonWriter to allow customized JsonBuilder

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.29.0
    • None

    Description

      Currently JsonBuilder in RelJsonWriter cannot be customized due to it being created in the constructor.  We can provide a new constructor for RelJsonWriter to allow customized JsonBuilder.

      // code placeholder
      public RelJsonWriter() {
        jsonBuilder = new JsonBuilder();
        relList = jsonBuilder.list();
        relJson = new RelJson(jsonBuilder);
      }
      
      // the new constrctor suggested.
      public RelJsonWriter(JsonBuilder jsonBuilder) {
        this.jsonBuilder = jsonBuilder;
        relList = jsonBuilder.list();
        relJson = new RelJson(jsonBuilder);
      }
      

      Attachments

        Issue Links

          Activity

            People

              Chunwei Lei Chunwei Lei
              Chunwei Lei Chunwei Lei
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m