···7272}
7373```
74747575-But if you use `site.GetDocument` to retrieve one, it will return a simple `site.Document` without your custom content!
7575+But if you use `site.GetRecord[*site.Document]` to retrieve one, it will return a simple `site.Document` without your
7676+custom content!
7677The `Document.Content` field is a `site.RecordJSON`, a wrapper.
7778You can get the type of the content with `RecordJSON.Type` and the raw bytes with `RecordJSON.Raw`.
7879You can also directly parse your `Content` with `RecordJSON.As`:
···8990### Marshal/Unmarshal
90919192When your record is sent, it is firstly marshaled to a map.
9292-We provide `site.MarshalToMap` which works like the JSON API:
9393+We provide `site.MarshalToMap` which works like the standard `encoding/json`:
9394```go
9495var c *Content
9596// mp is the map[string]any created
···103104```
104105105106It uses the `json` tag to determine how to marshal the content.
106106-It supports `omitempty`, `string` and embedded type.
107107+It supports `omitempty` and embedded type from the standard library.
108108+109109+If you want to marshal your field into a string, you can set `string` in the field tag (with the key `map` here).
110110+It automatically calls the `String() string` method.
111111+```go
112112+type Content struct {
113113+ Hey *url.URL `json:"hey" map:"string"`
114114+}
115115+/*
116116+mp = map[string]any{"hey": "https://example.org/"}
117117+*/
118118+```
107119108120If you are using complexe types, you may have to implement `json.Unmarshaler` to unmarshal from JSON and
109121`site.MarshalerMap` to marshal to a map.