Modified according to Json library.