BUG: to_json not serializing non-nanosecond numpy dt64 correctly
- [ ] closes #53686 (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

@lithomas1 is there a viable way to do this using values_for_json, i.e. keep this complexity out of the C code? > @lithomas1 is there a viable way to do this using values_for_json, i.e. keep this complexity out of the C code?

Long term, we could move to using ``to_native_types`` like CSV does, and just directly feed strings to the JSON serializer (for datetime/EA types).

I don't think this PR adds too much complexity (the core changes are just ~3 lines), so maybe we can merge this for now, and then try to pull the logic for anything other than native types (e.g. ints, floats) out of the JSON C code? The challenge with values_for_json is also that to_json has keyword arguments that control the JSON output, e.g. date_format and date_unit. Those are both handled in the serializer currently; values_for_json would have to handle those arguments generically across EAs > values_for_json would have to handle those arguments generically across EAs

that sounds like a better long-term solution than doing more here (assuming perf is OK).  I'm happy to defer to you two on this PR in the interim. gonna put this in then.

Thanks for the reviews all.