Actually the name of the function is a standard for serializers. See [this link](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON_behavior).

So I think that the name of the method is correct.