java - Jackson field value with no quotation marks -


is there annotation or other way tell jackson serialize string variables's value without quotation marks. serializer should serialize 1 field's value without quotation marks.

i looking return of similar to:

{"name": "namevalue", "click" : function (e){console.log("message");}} 

instead of

{"name": "namevalue", "click" : "function (e){console.log("message");}"} 

the above how external java script library requires data, if there not way have manual alter string after object mapper has converted json.

as others have pointed out, double-quotes not optional in json, mandatory.

having said that, can use annotation jsonrawvalue want.

public class pojo {   public string name;   @jsonrawvalue   public string click; } 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -