standard ml json implementation (just for fun)