Adding HTTP body to var elements, and check if json is parsable