jquery - Dictionary is not supported for deserialization of an array -



jquery - Dictionary is not supported for deserialization of an array -

updated:

i have next code, trying utilize returned json data, deserialize it, , homecoming 1 part of info user.

<%@ page language="vb" debug="true" enableviewstate="false" %> <%@ import namespace="system.web.script.serialization" %> <script runat="server"> class item public property some_number() double homecoming m_some_number end set(byval value double) m_some_number = value end set end property private m_some_number double public property some_text() string homecoming m_some_text end set(byval value string) m_some_text = value end set end property private m_some_text string public property serial_number() string homecoming m_serial_number end set(byval value string) m_serial_number = value end set end property private m_serial_number string end class protected sub page_load(byval sender object, byval e system.eventargs) response.clear() response.write(set_profiles()) response.end() end sub function set_profiles() string ' returned json info dim strchanged string = ctype(request.form("strchanged"), string) ' deserialize returned info dim jss = new javascriptserializer() ' assuming need alter line now? dim dict dictionary = jss.deserialize(list(of item))(strchanged) homecoming dict("some_number") end function </script>

i don't understand how deserialize item class, how info out.

your info array, , you're trying deserialize dictionary. won't work.

either alter input info or deserialize array.

you can declare class , utilize in deserialization.

c#, sorry:

class item { public double some_number { get; set; } public string some_text { get; set; } public string serial_number { get; set; } }

and deserialize list(of item)

jquery .net vb.net json .net-3.5

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -