Skip to content

Conversation

dellis1972
Copy link
Contributor

@dellis1972 dellis1972 commented Feb 14, 2025

Context #9229

This is part of our code modernisation effort. In this case the effort to replace Newtonsoft.Json usage throughout the codebase with System.Text.Json.

@dellis1972 dellis1972 marked this pull request as ready for review February 17, 2025 09:49
@dellis1972 dellis1972 requested a review from jonpryor as a code owner February 17, 2025 09:49
Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My comments are pretty minor, the rest looks good.

@jonpryor
Copy link
Contributor

Context: f6f11a5a797cd8602854942dccb0f2b1db57c473
Context: https://github.com/dotnet/android/issues/9229

Commit f6f11a5a added support for type and member remapping, to
assist the InTune team.

The `MamJsonParser` type added in f6f11a5a uses Newtonsoft.Json, and
is one of very few uses of Newtonsoft.Json.

Update `MamJsonParser` to use System.Text.Json, so that we can
eventually remove the Newtonsoft.Json dependency from our installs.

Additionally, add a unit test (shock!) for the `<MamJsonToXml/>` task.

The input `mam.json` test JSON data comes from the
`content/MonoAndroid10/remapping-config.json` file within the
[`microsoft.intune.mam.remapper.tasks` NuGet package][0], while
`mam.xml` is the expected output from `tools/remap-mam-json-to-xml`.

Co-authored-by: Jonathan Peppers <[email protected]>

[0]: https://www.nuget.org/packages/Microsoft.Intune.MAM.Remapper.Tasks/0.1.4635.1

@dellis1972 dellis1972 merged commit 32c8bf6 into main Feb 21, 2025
58 checks passed
@dellis1972 dellis1972 deleted the dev/dellis1972/mamjsontest branch February 21, 2025 08:30
@github-actions github-actions bot locked and limited conversation to collaborators Mar 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants