You may be need to resolve references inside json directly before deserialization. Try this lib - https://crates.io/crates/json_deref Not the same syntax as $ref but can evaluate embedded in text references