For your second question read this post from @Fox ,
maybe its what you need. Its in Russian, but you can
use translator. There is an example script too >
@lymz101 Well, it's a file with data, not an answer in json format, save it to disk and from it already take a random string for example, and then it should be parsed