Refactor: checking first character for each phase.
Fix bug

Fix bug: It's invalid when "," occurs at the end of array or object.
Add test for json parser.

Add unit test for json parser.