Accessing nameless attributes from JSON in VB .Net using DataContract -


i'm trying serialize in vb .net json file contains this: "scripts": [[123, 80, [["whenkeypressed", "space"], ["nextcostume"]]], [55, 32, [["whenkeypressed", "space"], ["doplaysoundandwait", "hello"]]]]

i'm using datacontract , <datamember(name:="scripts")> , works fine rest of file, in case, attributes don't have names. jsonlint.com, json validator, saying valid json.

how suppose qualify datamembers? also, has nameless array in it, how can can access it?

any appreciated.

i found workaround assigning scripts list(of object) in datacontract, casting scripts desired type @ runtime. casted ilist(of object) lists , iterated in them for loops.

it doesn't "feel" "object-oriented" rest , can't reference fields name (since have none), works (with lot of casting, since work option strict on).

if there better way, open suggestions.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -