json decode issue
Terry Reedy
tjreedy at udel.edu
Thu Jul 14 16:03:03 EDT 2011
On 7/14/2011 3:20 PM, MRAB wrote:
> On 14/07/2011 18:22, Miki Tebeka wrote:
>> Greetings,
>>
>> I'm trying to decode JSON output of a Java program (jackson) and
>> having some issues.
>> The cause of the problem is the following snippet:
>> {
>> "description": "... lives\uMOVE™ OFFERS ",
>> }
>> Which causes ValueError: Invalid \uXXXX escape.
>>
>> Any ideas on how to fix this?
>>
> Is that valid JSON? If not, you'll either need to fix the program which
> generated it (or report it as a bug), or pre-process the JSON to
> correct the error, if you know what it should be.
If you delete or double the backslash in that one particular spot, the
string will parse, even if it is not correct.
--
Terry Jan Reedy
More information about the Python-list
mailing list