Big news! The community will be moving to a new platform April 21. Read more.
Big news! The community will be moving to a new platform April 21. Read more.
Absent Member.
Absent Member.
2588 views

[UFT][JSON] Validate Json file

Hi,
in UFT which is the better way for to validate JSON file?

I'm trying with www.jsonlint.com, but I not found the way for to put in the text in textarea.

Thanks.

Tags (1)
0 Likes
4 Replies
Commodore Commodore
Commodore

Do you have more specifics?  If a REST based service, you should be able to validate the expected JSON response with the various checkpoint options in your API test.

0 Likes
Absent Member.. Absent Member..
Absent Member..

I use this when im working with JSON in UFT http://aspjson.com/

 Function GetJSON(json)
    Set oJSON = New aspJSON
    oJSON.loadJSON(json)
    Set GetJSON = oJSON.data
    Set oJSON = Nothing
End Function


Set oResult = GetJSON(strJSon)

print oResult("test")

Lieutenant Commander Lieutenant Commander
Lieutenant Commander

Hi,
How do I define class "aspJSON" to UFT?
0 Likes
Captain Captain
Captain

Hi, 

we are using this API https://www.chilkatsoft.com/refdoc/xChilkatJsonObjectRef.html

It's free and working well for reading  writing json files (complex and simple ones)

https://www.example-code.com/vbscript/json.asp

Cheers

mti

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.