0

I have the text data which has the format as shown below. How can I convert it into a JSON using python?

{"CRW_CODE":"CREW81","CRW_LASTSAVED":"2020-03-17 10:49:49.0","CRW_DESC":"Crew 37"}
{"CRW_CODE":"CREW82","CRW_LASTSAVED":"2020-03-17 10:49:53.0","CRW_DESC":"Crew 37"}
1

1 Answer 1

0

you can use json module

import json
json.loads(data)
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your input....This code doesn't works if we have multiple tags like below :{ "CRW_CODE": "ABCDEFGHIJKLMNOPQRSTUVWX", "CRW_LASTSAVED": "ABCDEFGHIJKLMNOPQR", "CRW_DESC": "ABCDEFGHIJKLMNOPQRSTUV" } { "CRW_CODE": "ABCDEFGHIJKLMNOPQRSTUVWX", "CRW_LASTSAVED": "ABCDEFGHIJKLMNOPQR", "CRW_DESC": "ABCDEFGHIJKLMNOPQRSTUV" }

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.