Custom JSON representation for serialization