aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp/src/Google.Protobuf.Test/JsonFormatterTest.cs
Commit message (Collapse)AuthorAge
* MMinor fix-ups to C# tests from changes in earlier commitsGravatar Jon Skeet2017-11-12
|
* Add FormatEnumAsInt support for Json Format. And scale ↵Gravatar Jie Luo2017-03-24
| | | | JsonFormatter.Settings to multiple options.
* There might be duplicated enum values when allow_alias is true. Add ↵Gravatar Jie Luo2017-02-28
| | | | PreferredAlias into OriginalNameAttribute to remove the duplication (#2727)
* Change JSON field name formattingGravatar Jon Skeet2016-11-03
| | | | | | | | | This affects cases with leading capital letters. This breaks compatibility with previous C# releases, but fixes compatibility with other implementations. See #2278 for details.
* Bring C#'s ToPascalCase method in line with C++.Gravatar Jon Skeet2016-07-27
| | | | | (This still doesn't fix the conformance tests, but at least we're now consistent with the C++ code.)
* Expose JsonFormatter.WriteValue.Gravatar Jon Skeet2016-06-23
| | | | | This isn't useful to most users, but can be handy in advanced use cases, as requested in #1465.
* Move test for standalone BoolValue to JsonParserTestGravatar Jon Skeet2016-05-11
| | | | | | Also added a standalone formatter test, for confidence. Have validated that undoing the change in 835fb947 breaks the tests (i.e. we are still testing that the change is required).
* Allow custom type URL prefixes in Any.PackGravatar Jon Skeet2016-04-29
| | | | | | (And likewise ignore the prefix in unpack.) Fixes issue #1459.
* Regenerate all C# code and make it compileGravatar Jon Skeet2016-04-20
| | | | JSON tests fail, as we're not using OriginalNameAttribute yet.
* Remove duplicate test cases.Gravatar Jon Skeet2016-04-01
| | | | (NCrunch noticed these.)
* Ensure that FieldMask, Timestamp and Duration ToString() calls don't throwGravatar Jon Skeet2016-01-20
| | | | | | | | | | | | | The usage of ICustomDiagnosticMessage here is non-essential - ToDiagnosticString doesn't actually get called by ToString() in this case, due to JsonFormatter code. It was intended to make it clearer that it *did* have a custom format... but then arguably I should do the same for Value, Struct, Any etc. Moving some of the code out of JsonFormatter and into Duration/Timestamp/FieldMask likewise feels somewhat nice, somewhat nasty... basically there are JSON-specific bits of formatting, but also domain-specific bits of computation. <sigh> Thoughts welcome.
* Fix broken testGravatar Jon Skeet2016-01-15
|
* Change handling of unknown enums: we now write out the value as a number.Gravatar Jon Skeet2016-01-15
|
* Extra strictness for FieldMask conversionGravatar Jon Skeet2016-01-15
|
* Fixes to JSON timestamp/duration representationsGravatar Jon Skeet2016-01-15
|
* Prohibit null values in map fieldsGravatar Jon Skeet2016-01-11
| | | | | On deserialization, missing values for message types are replaced with a "default" message.
* Ensure all formatted well-known-type values are valid JSONGravatar Jon Skeet2016-01-06
| | | | | | | This involves quoting timestamp/duration/field-mask values, even when they're not in fields. It's better for consistency. Fixes issue #1097.
* JSON formatting for Any.Gravatar Jon Skeet2015-12-02
|
* Implement JSON parsing in C#.Gravatar Jon Skeet2015-11-03
| | | | | | | | | | This includes all the well-known types except Any. Some aspects are likely to require further work when the details of the JSON parsing expectations are hammered out in more detail. Some of these have "ignored" tests already. Note that the choice *not* to use Json.NET was made for two reasons: - Going from 0 dependencies to 1 dependency is a big hit, and there's not much benefit here - Json.NET parses more leniently than we'd want; accommodating that would be nearly as much work as writing the tokenizer This only really affects the JsonTokenizer, which could be replaced by Json.NET. The JsonParser code would be about the same length with Json.NET... but I wouldn't be as confident in it.
* remove duplicate test caseGravatar Jan Tattermusch2015-08-14
|
* JSON formatting for FieldMaskGravatar Jon Skeet2015-08-03
|
* Initial pass at formatting Struct as JSON.Gravatar Jon Skeet2015-08-03
| | | | This seems remarkably little code, but it appears to work. I can add tests for invalid structs at some point, once the general approach is approved.
* Format JSON for Duration and Timestamp.Gravatar Jon Skeet2015-08-03
| | | | This is taking an approach of putting all the logic in JsonFormatter. That's helpful in terms of concealing the details of whether or not to wrap the value in quotes, but it does lack flexibility. I don't *think* we want to allow user-defined formatting of messages, so that much shouldn't be a problem.
* Simplify the JSON tests for readabilityGravatar Jon Skeet2015-07-31
| | | | Use ' instead of " in the expected JSON, then replace it before asserting.
* Fix JSON formatting to always emit fields in field order, including oneofsGravatar Jon Skeet2015-07-31
|
* First part of JSON formatting for well-known types. I think we need a ↵Gravatar Jon Skeet2015-07-20
| | | | reflection API rethink before doing the rest.
* First pass at the big rename from ProtocolBuffers to Google.Protobuf.Gravatar Jon Skeet2015-07-17
We'll see what I've missed when CI fails...