json_encode

Last post 09-12-2009 8:01 PM by M imran shafiq. 2 replies.

Sort Posts:

  • json_encode

    09-12-2009, 3:34 PM

    What is Php json_encode alternative for asp.net?

    If this post was useful to you, please mark it as answer. Thank you!

    Regards.
    mimranshafiq
    .NET Web Developer
    http://www.dotnetclassic.com
  • Re: json_encode

    09-12-2009, 7:49 PM
    Answer
    • Participant
      1,403 point Participant
    • yassir.2
    • Member since 07-06-2007, 11:46 PM
    • Morroco
    • Posts 346
    System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
    string jsonresult = serializer.Serialize(/*object to serialize*/);
    
    


     

    if this post unswerd ur question marke it as answer
  • Re: json_encode

    09-12-2009, 8:01 PM
    Answer

    string[] myarr = { "Chris", "Hi", "Asp.Net"};
    JavaScriptSerializer serializer=new JavaScriptSerializer();
    string arrayJson = serializer.Serialize(myarr);


    If this post was useful to you, please mark it as answer. Thank you!

    Regards.
    mimranshafiq
    .NET Web Developer
    http://www.dotnetclassic.com
Page 1 of 1 (3 items)