Trying to fix build. Refactored JSON serialization.