fix #354 by switching to JSON.{pasre,stringify}