Hacker News new | past | comments | ask | show | jobs | submit login

So, the extra quotes may seem like a lot, but I think in practice these are going to be parameterized queries... so something like this (in Python):

    cursor.execute(
        """UPDATE t SET j['k'] = ?;""",
        (json.dumps(newvalue),))
For transmitting JSON to the database server, it makes sense that the JSON would be serialized as a string, because that's the only standardized serialization format for JSON anyway. When you use parameterized queries, the parameters don't get quotes.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: