Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-1877

The ranger policies json file should be formatted when exported at ranger service manager.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • master
    • 1.0.0, master
    • admin, Ranger
    • None
    • Patch

    Description

      The ranger policies json file should be formatted when exported at ranger service manager.
      I found it's difficult to edit the unformatted json file.

      ServiceDBStore.java
      private void writeJson(List<RangerPolicy> policies, String jsonFileName,
      			HttpServletResponse response) throws JSONException, IOException {
      		... ...
      		//Gson gson = new Gson();      //shoud be replaced:
                      Gson gson = new GsonBuilder().setPrettyPrinting().create();
      		
                      String json = gson.toJson(rangerExportPolicyList, RangerExportPolicyList.class);
                      ... ...
      

      Attachments

        Activity

          People

            wangyuan Yuan Wang
            wangyuan Yuan Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: