json - C# Property Named Event -


I am using Jason Serializer and need to bind property by the name 'Event', of course the event is in C # If there is a keyword, do something like that string event {get; Set; } is not allowed anyway what about doing so? I can not change the name of the object coming back.

Assume that you are using Jason .net, you can use, or , Or (an underlying one that camels things, so a property name for event will be named event .).

  [Jasonproperty ("Event")] Received Public String Event { Set; } Public string @ event {get; Set; } Public string event {get; Set; } Var s = JsonConvert.SerializeObject (myObj, New JsonSerializer Settings [Contract = New CamelCasePropertyNamesContractResolver ()});    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -