Json object is printed in strange format in Python -
so request steam page responds json:
{"success":true,"lowest_price":"$2.23","volume":"2,842","median_price":"$2.24"}
my objective transform dictionary in python, when return json object in function this:
{u'volume': u'2,842', u'median_price': u'2,02€ ', u'lowest_price': u'1,99€ ', u'success': true} (notice u').
what can eliminate u's?
you're seeing python letting know strings you're printing unicode strings. unless output you're seeing matters (e.g., it's input else), can disregard leading 'u' character until run issues unicode output.
there litany of stack overflow questions address this.
- python string prints [u'string']
- what's u prefix in python string
- printing string prints 'u' before string in python?
and lot more....
Comments
Post a Comment