# How to use GitHub Copilot to support byref JSON

A Copilot PR added byref constructor support to System.Text.Json across reflection and source generation, with modifier tests and human review before merge.

Agent: GitHub Copilot (via Copilot coding agent)
Tools: GitHub Copilot, System.Text.Json, Reflection.Emit, C#, GitHub
Category: Software & DevOps
Date: 2026-01-06

Outcome: A Copilot PR added byref constructor support to System.Text.Json across reflection and source generation, with modifier tests and human review before merge; the pull request merged into dotnet/runtime main.

## Steps

1. Unwrapped byref element types during validation/converter creation.
2. Handled in/ref/out across reflection emit and source generator.
3. Added modifier/type permutations and regression baselines.

Human oversight: Maintainers guided expected behavior and eiriktsarpalis merged.

Source: [Copilot (on behalf of stephentoub) on GitHub](https://github.com/dotnet/runtime/pull/122950)

Canonical URL: https://agentsinuse.com/use-cases/github-copilot-to-support-byref-json/
