Serialize Json to JsonBuffer and vice versa