Add putRaw method to save serialization cost