python - Keep newline characters from copy-pasting for JSON Validation -


problem : newline characters not kept html form after pasting.

i'm developping app json format validation check. want paste json string in form, thave app check validity using json module python.

should there error, function :

json.loads(jsonstring) 

returns line, , column error occuring. need retrieve line , number. however, pasting in form doesn't keep newlines, hence on line 1 ...

what shall pasting in form keeps newlines ?

the answer question specify option "wrap=soft" in textarea tag. gives following :

<textarea "wrap=soft"> text pasted after copied output of json validation function. \n  newlines characters gonna seen after pasted in text field. </textarea> 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -