-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JsonData Updates: Add WriteTo(), ==operators, and PR FB (#33038)
* Add WriteTo(), ==operators, and PR FB * export API * pr fb
- Loading branch information
1 parent
e786c1b
commit 210570d
Showing
9 changed files
with
419 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using System.Text.Json; | ||
|
||
namespace Azure.Core.Dynamic | ||
{ | ||
/// <summary> | ||
/// A dynamic abstraction over content data. Deriving types are implemented | ||
/// for a specific format, such as JSON or XML. | ||
/// | ||
/// This and related types are not intended to be mocked. | ||
/// </summary> | ||
public abstract class DynamicData | ||
{ | ||
/// <summary> | ||
/// Writes the data to the provided writer as a JSON value. | ||
/// </summary> | ||
/// <param name="writer">The writer to which to write the document.</param> | ||
/// <param name="data">The dynamic data value to write.</param> | ||
public static void WriteTo(Utf8JsonWriter writer, DynamicData data) | ||
{ | ||
data.WriteTo(writer); | ||
} | ||
|
||
internal abstract void WriteTo(Utf8JsonWriter writer); | ||
} | ||
} |
Oops, something went wrong.