Changed JsonParser according to the changes suggested by Chirag