JSON.NET and Replacing @ Sign in XML to JSON converstion -


JSON.NET Framework can convert XML to JSON, but it uses @Sign in JSON as the attribute is. What will be the best way for me to remove it before sending it to the scene?

I know that I can replace a straight up, but a @ character can be relevant somewhere and it should not be replaced. Is there a regx for this?

  public action results () {var xml = New XmlDocument (); Xml.XmlResolver = null; Xml.Load (Server.MapPath ("~ / App_Data / Navigation.xml")); Return content (JsonConvert.SerializeXmlNode (xml, Newtonsoft.Json.Formatting.Indented)); } "{{" "Type": "menu", "@ title"}   
  {"layout": {"navigation "@ Type": "menu", "@ root": "event", "@ title": "event", "navigation": {"@ type": "action", "@" event "," "@" ":" + Add event "," @order ":" 1 "," navigation ": {" @ type ":" item "," @ root ":" event "," event "" @ name ": "{@ Root": "pool", "@ type": "subnavigation", "@ name": "pool"}, {"@ root": "brackets", "@ Type ":" subnavigation "," @ name ":" brackets "}]}}}]}}    

  public action results () {Var xml = New XmlDocument (); Xml.XmlResolver = null; xml.Load (Server.MapPath ("~ / App_Data / Navigation.xml")); Var jsonText = JsonConvert.SerializeXmlNode (XML, NewTenf.Jason.formatting Indent); return content (Regex.Replace (jsontext, "(? & Lt; = \ ") (@!). * \": \\ s) ", string.opti, reggaepection.gnoredCase);}    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -