Input and Json problems with quotation marks

1

Hello. I'm developing a web application using SpringFrontEnd and a Restful API on the backend. The front is in javascript getting API data. Here's a problem ....

When entering a field in some Input or Textarea It breaks the code and returns 400.

If the JSON that I get from the inputs has "" quotes and I enter in the input 'for tests it returns the error.     Unexpected character ('' '(code 34)): was expecting comma to separate OBJECT entries     at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor $ UnCloseableInput Stream @ 36f8cabd; line: 1, column: 26]

Here I ask. It is advisable to move all the places I do the concatenation of JSON pro Ajax to the API. Or create a global function to remove double or single quotes from all input and textarea?

Remembering that my project is immense, more than 40 pages .jsp of view and several in the API. What suggestions do you give me? Thank you, I do not.

    
asked by anonymous 22.06.2016 / 22:31

0 answers