[ 
https://issues.apache.org/jira/browse/RANGER-1877?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

WangYuan updated RANGER-1877:
-----------------------------
    Issue Type: Improvement  (was: Bug)

> The ranger policies json file should be formatted when exported  at ranger 
> service manager. 
> --------------------------------------------------------------------------------------------
>
>                 Key: RANGER-1877
>                 URL: https://issues.apache.org/jira/browse/RANGER-1877
>             Project: Ranger
>          Issue Type: Improvement
>          Components: admin, Ranger
>    Affects Versions: master
>            Reporter: WangYuan
>            Assignee: WangYuan
>            Priority: Minor
>         Attachments: 
> 0001-RANGER-1877-The-ranger-policies-json-file-should-be-.patch
>
>
> 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.
> {code:title=ServiceDBStore.java|borderStyle=solid}
> 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);
>                 ... ...
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to