JSON Data Format이 유효한지 확인할 방법이 있을까요?

JSON Data를 가지고 있는 String을 Json Object로 변환하기전에
포맷이 정상인지 사전에 확인해볼 방안이 있을까요?
StudioX 에서는 Try Catch Activities를 쓸 수 없어서
여러가지 방법을 찾아보고 있는데 도움이 필요합니다.

Hi @mountie

Actually, you can. From Activities filter, we have an option to enable Developer Activities:

I tried to “Try Catch”
but unable to check the json data is match to pre-defined scheme.

HI,

How about the following?

Dim jo As Newtonsoft.Json.Linq.JObject
Dim js As Newtonsoft.Json.Schema.JsonSchema
Try
jo = Newtonsoft.Json.Linq.JObject.Parse(strData)
js = Newtonsoft.Json.Schema.JsonSchema.Parse(strSchema)
'isValid = jo.IsValid(js)
isValid = Newtonsoft.Json.Schema.Extensions.IsValid(jo,js)
Catch ex As Exception
isValid=False
End Try	

Sample
NewBlankTask20231121-1.zip (50.3 KB)

Regards,

thank you very much.
I will try this suggestion.