Added type inference to local variables.
Added json test case