N
N
nano_e_t_42017-09-25 14:44:49
go
nano_e_t_4, 2017-09-25 14:44:49

How to extract json from a string?

Hello everyone
, there is a line like this:

"tru la la - opugali maclhuka , ia iadfat {'Name':'Mister', 'Seconde Name': 'Bin'} dfhfg oh oh klA"

Accordingly, you need to somehow extract json from it.
Tell me, plz, how can this be done?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
IllusionTurtle, 2017-09-25
@IllusionTurtle

secure - nothing.
find the first occurrence of "{" and the last "}" either through strings.Index or through regular expressions and try to parse as json.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question