JSON foromat save

Does Servicestack ORM support saving of JSON data in Postgres? I am looking for a simple example where I can save JSON test into postgress …not a DTO serialized to JSON. Some thing like

INSERT INTO cards VALUES (1, 1, ‘{“name”: “Paint house”, “tags”: [“Improvements”, “Office”], “finished”: true}’);



Yeah there’s limited support for PostgreSQL’s rich JSON and Array data types, you can use the [Pgsql*] attributes to create tables with the appropriate PostgreSQL type, e.g:

public class ModelWithJsonType
    public int Id { get; set; }

    public ComplexType ComplexTypeJson { get; set; }

    public ComplexType ComplexTypeJsonb { get; set; }

public class PgsqlData
    public Guid Id { get; set; }
    public int[] Ints { get; set; }

    public string[] Strings { get; set; }

    public List<int> ListInts { get; set; }

    public List<string> ListStrings { get; set; }

Which you can Save/Insert but there’s no Typed API to be able to query PostgreSQL types so you’d need to use PostgreSQL’s Custom SQL to perform any queries on them, some examples in: