Refactored json read/write method sig.