fix deprecation warning for json