docs: remove unnecessary template before get in README & docs (fixes #4825)
Description This pull request resolves issue #4825 by removing the unnecessary template keyword from get() calls in non-dependent contexts throughout the README and MkDocs documentation.
What Replaced .template get<...>() with .get<...>() in documentation examples where it was not required. No library code was changed.
Why Improves the clarity and correctness of the code examples for users. The .template keyword is only necessary for dependent names in C++ templates and can be confusing when used outside of that context.
How Tested Successfully built and previewed the documentation locally using mkdocs. Ran the full CTest suite as a courtesy check to ensure no regressions were introduced.
Can you take a look at the PR will turn the DCO green once all checks are passed!
Please rebase to the latest develop branch so the CI can run successfully. Also please check https://github.com/nlohmann/json/pull/4920/checks?check_run_id=50274941755
Hi @aryanrahar, can you please rebase?
Actually my midsem exams are going i will do the work in 1-2 days!
On Sat, 20 Sep 2025 at 8:09 PM, Niels Lohmann @.***> wrote:
nlohmann left a comment (nlohmann/json#4920) https://github.com/nlohmann/json/pull/4920#issuecomment-3315008938
Hi @aryanrahar https://github.com/aryanrahar, can you please rebase?
— Reply to this email directly, view it on GitHub https://github.com/nlohmann/json/pull/4920#issuecomment-3315008938, or unsubscribe https://github.com/notifications/unsubscribe-auth/BU52OI37IHVKF43B7B7HJGT3TVRIRAVCNFSM6AAAAACGMH6RHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGMJVGAYDQOJTHA . You are receiving this because you were mentioned.Message ID: @.***>
Actually my midsem exams are going i will do the work in 1-2 days!
No worries - good luck to you! 🍀
Can you approve the change?
is there any issue?
coverage: 99.191%. remained the same when pulling 41a0fee91c8dcb45b3464a85dc50a1e56c30d89a on aryanrahar:docs/fix-4825-remove-template-get into 54be9b04f0ec65d0bcfe0da54e7f01ea86fbfc3e on nlohmann:develop.
Can you please rebase to the latest develop branch to have a green CI?
Done
Can you please rebase to the latest
developbranch to have a green CI?
done
I just merged #4846 which worked on the same issue. Please rebase your branch to see whether there is anything left to do.
This pull request has been marked as stale because it has had no activity for 30 days. While we won’t close it automatically, we encourage you to update or comment if it is still relevant. Keeping pull requests active and up-to-date helps us review and merge changes more efficiently. Thank you for your contributions!