support php versions without json support and show a warning message