Start a new topic

Pretty-print logs

[Mark]


Reading flat JSON is fairly difficult. One of the things I commonly do is copy and paste the log into a formatter to look at it.


Example:

 

{"log":true,"message":"[{u'ArticleName': u'Complementary and alternative medicines and childhood eczema', u'Person': u'https://northwestern.pure.elsevier.com/person#15fdf691-d723-4fe1-9d01-b35473be2e95', u'doi': u'http://dx.doi.org/10.1097/DER.0000000000000072', u'Author': u'Jonathan I Silverberg', u'Article': u'https://northwestern.pure.elsevier.com/publication#f2532b55-d862-4817-b831-1f777db8eca8'}, {u'ArticleName': u'Complementary and alternative medicines and childhood eczema', u'Person': u'https://northwestern.pure.elsevier.com/Person#769715981', u'doi': u'http://dx.doi.org/10.1097/DER.0000000000000072', u'Author': u'Mary Lee-Wong', u'Article': u'https://northwestern.pure.elsevier.com/publication#f2532b55-d862-4817-b831-1f777db8eca8'}, {u'ArticleName': u'Complementary and alternative medicines and childhood eczema', u'Person': u'https://northwestern.pure.elsevier.com/Person#1708441686', u'doi': u'http://dx.doi.org/10.1097/DER.0000000000000072', u'Author': u'Nanette B. Silverberg', u'Article': u'https://northwestern.pure.elsevier.com/publication#f2532b55-d862-4817-b831-1f777db8eca8'}, {u'ArticleName': u'Dermatoses secondary to Asian cultural practices', u'Person': u'https://northwestern.pure.elsevier.com/Person#-1586515601', u'doi': u'http://dx.doi.org/10.1111/j.1365-4632.2011.05170.x', u'Author': u'Evelyn Lilly', u'Article': u'https://northwestern.pure.elsevier.com/publication#53299636-3a10-407c-9c25-bc12c9f13b47'}, {u'ArticleName': u'Dermatoses secondary to Asian cultural practices', u'Person': u'https://northwestern.pure.elsevier.com/person#abb31d14-75f7-4467-81d2-5dc6ce71d6b3', u'doi': u'http://dx.doi.org/10.1111/j.1365-4632.2011.05170.x', u'Author': u'Roopal Vashi Kundu', u'Article': u'https://northwestern.pure.elsevier.com/publication#53299636-3a10-407c-9c25-bc12c9f13b47'}]","value":null}

 

Vs.

  

{
 "log": true,
 "message": "[{
   u 'ArticleName': u 'Complementary and alternative medicines and childhood eczema',
   u 'Person': u 'https://northwestern.pure.elsevier.com/person#15fdf691-d723-4fe1-9d01-b35473be2e95',
   u 'doi': u 'http://dx.doi.org/10.1097/DER.0000000000000072', u 'Author':
   u 'Jonathan I Silverberg', u 'Article': u 'https://northwestern.pure.elsevier.com/publication#f2532b55-d862-4817-b831-1f777db8eca8'
 }, {
   u 'ArticleName': u 'Complementary and alternative medicines and childhood eczema',
   u 'Person': u 'https://northwestern.pure.elsevier.com/Person#769715981',
   u 'doi': u 'http://dx.doi.org/10.1097/DER.0000000000000072', u 'Author':
   u 'Mary Lee-Wong', u 'Article': u 'https://northwestern.pure.elsevier.com/publication#f2532b55-d862-4817-b831-1f777db8eca8'
 }, {
   u 'ArticleName': u 'Complementary and alternative medicines and childhood eczema',
   u 'Person': u 'https://northwestern.pure.elsevier.com/Person#1708441686',
   u 'doi': u 'http://dx.doi.org/10.1097/DER.0000000000000072', u 'Author':
   u 'Nanette B. Silverberg', u 'Article': u 'https://northwestern.pure.elsevier.com/publication#f2532b55-d862-4817-b831-1f777db8eca8'
 }, {
   u 'ArticleName': u 'Dermatoses secondary to Asian cultural practices',
   u 'Person': u 'https://northwestern.pure.elsevier.com/Person#-1586515601',
   u 'doi': u 'http://dx.doi.org/10.1111/j.1365-4632.2011.05170.x', u 'Author':
   u 'Evelyn Lilly', u 'Article': u 'https://northwestern.pure.elsevier.com/publication#53299636-3a10-407c-9c25-bc12c9f13b47'
 }, {
   u 'ArticleName': u 'Dermatoses secondary to Asian cultural practices',
   u 'Person': u 'https://northwestern.pure.elsevier.com/person#abb31d14-75f7-4467-81d2-5dc6ce71d6b3',
   u 'doi': u 'http://dx.doi.org/10.1111/j.1365-4632.2011.05170.x', u 'Author':
   u 'Roopal Vashi Kundu', u 'Article': u 'https://northwestern.pure.elsevier.com/publication#53299636-3a10-407c-9c25-bc12c9f13b47'
 }]",
 "value": null
}

  

Login to post a comment