[#2397] json perl fixes for legacy tests