Calling methods according to JSON