In rust: should probably just be a generic over json serializable if it's not already. For everything else (that supports generic): just make it generic. This will let people have more strict type checking.