This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Description
can you help me work out how to inject the result count into the meta? i have it in an int64 in my own function
func Encode(w io.Writer, mm interface{}, resultCount int64) error {
return jsonapi.MarshalPayload(w, mm)
}
I see I can add it to a each of my model structs as a JSONAPIMeta() but those models don't know the count of results, I don't have a way of getting the integer into those objects.
Can't I just tell the jsonapi module what to put in the meta at time of encoding?