Open iamakilan opened 5 years ago
Try a zero
Larry E. Barton
From: iamakilan notifications@github.com Sent: Tuesday, August 27, 2019 1:15:56 AM To: google/gson gson@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [google/gson] Gson pretty printing (#1569)
I want the output for empty object or array like below "metadata": { },
but actual am getting "metadata": {},
help me to overcome this.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/google/gson/issues/1569?email_source=notifications&email_token=AM2ZTS6X4FDQCIAL4KDAS3LQGS2AZA5CNFSM4IP5FC2KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HHRPNBQ, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AM2ZTS6DMEMXELOCZCTTLGTQGS2AZANCNFSM4IP5FC2A.
create a gson instance like this:
Gson gson = new GsonBuilder().setPrettyPrinting().create();
I want the output for empty object or array like below "metadata": { },
but actual am getting "metadata": {},
help me to overcome this.