Reputation: 597
I have a table in MySql:
CREATE TABLE db.catalog (
id varchar(36) NOT NULL,
pictures json DEFAULT NULL
)
and declaration form code
public class catalog {
public string id { get; set; }
public List<string> pictures { get; set; }
}
and I have data: pictures = ["JavaScript", "ES2015", "JSON"]
When you run the query through OrmLite deserializing is not correct...
It is evident that the deserialization as in the cases of key-value data.
I'm doing something wrong? or is it meant to be?
Thanks!
Upvotes: 1
Views: 63
Reputation: 597
This code will help, the question is closed:
MySqlDialect.Provider.StringSerializer = new JsonDataContractSerializer();
Thanks @mythz: https://stackoverflow.com/a/35186935/7015077
Upvotes: 1