Support json as input - #236