Solving problems with JSON