Langsung ke konten utama

Postingan

Menampilkan postingan dengan label IsJSON()

Is It Json Or Not?

The next is formatted inward JSON ["wclass", {"student":{"name":"Linda Jones","legacySkill":"Access, VB 5.0"}etc.. }, {  "student":{"name":"Adam Davidson","legacySkill":"Cobol, MainFrame"} }, {"student":{"name":"Charles Boyer","legacySkill":"HTML, XML"} }] This is a valid JSON according to RFC 4627. json_01 However when you lot role this inward SQL Server to hold off at the JSON using the OpenJSON, for example, you lot volition larn this error: json_00 The argue for this error: Msg 103, Level 15, State 4, Line 2 The identifier that starts alongside "wclass"... lies inward the fact that SQL Server string starts alongside a unmarried quote together with thence you lot ask to supply this declaration: declare @json nvarchar(Max) set @json= '["wclass", {"student":{"name":...