Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The article points out that you can use their ISJSON function as a check constraint on your column, guarding it from malformed data:

> ISJSON( jsonText ) that checks is the NVARCHAR text input properly formatted according to the JSON specification. You can use this function the create check constraints on NVARCHAR columns that contain JSON text.



Thanks... I somehow missed the check constraint ability, which addresses the malformed data issue.


Not to nitpick. But you want this validation to be default. In this case which it can't be.

Question is what stopped MS to just wrap this NVARCHAR with json validation and json access and give it as json type. May be native json type will be added in future versions. I think just they wanted to ball to rolling.


> Question is what stopped MS to just wrap this NVARCHAR with json validation and json access and give it as json type

A large part of the blog post [1] is dedicated to this issue?

> In SQL Server 2016, JSON will be represented as NVARCHAR type. There are three reasons for this:

[1] http://blogs.msdn.com/b/jocapc/archive/2015/05/16/json-suppo...




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

Search: