use JSON stringily and parse

use JSON stringily and parse to handle body and variables