ENH: Add jsonline output format in to_dict(), failing type checks
- [ ] closes #58123 (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.

I got stuck and this is incomplete. Maybe it's not a great thing to do returning string in to_dict() functions.

Thanks for the contribution! As mentioned in the original issue, this is already doable with `DataFrame.to_json(orient='records', lines=True)`, and `DataFrame.to_dict` should only be returning a dictionary value and not a string (hence the name), so it doesn't make sense to implement it here I agree with @Aloqeely - this should already be implemented via .to_json so no reason to duplicate that here