summaryrefslogtreecommitdiff
path: root/csharp/src/Google.Protobuf.Test/JsonFormatterTest.cs
AgeCommit message (Collapse)Author
2016-04-29Allow custom type URL prefixes in Any.PackJon Skeet
(And likewise ignore the prefix in unpack.) Fixes issue #1459.
2016-04-20Regenerate all C# code and make it compileJon Skeet
JSON tests fail, as we're not using OriginalNameAttribute yet.
2016-04-01Remove duplicate test cases.Jon Skeet
(NCrunch noticed these.)
2016-01-20Ensure that FieldMask, Timestamp and Duration ToString() calls don't throwJon Skeet
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.
2016-01-15Fix broken testJon Skeet
2016-01-15Change handling of unknown enums: we now write out the value as a number.Jon Skeet
2016-01-15Extra strictness for FieldMask conversionJon Skeet
2016-01-15Fixes to JSON timestamp/duration representationsJon Skeet
2016-01-11Prohibit null values in map fieldsJon Skeet
On deserialization, missing values for message types are replaced with a "default" message.
2016-01-06Ensure all formatted well-known-type values are valid JSONJon Skeet
This involves quoting timestamp/duration/field-mask values, even when they're not in fields. It's better for consistency. Fixes issue #1097.
2015-12-02JSON formatting for Any.Jon Skeet
2015-11-03Implement JSON parsing in C#.Jon Skeet
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.
2015-08-14remove duplicate test caseJan Tattermusch
2015-08-03JSON formatting for FieldMaskJon Skeet
2015-08-03Initial pass at formatting Struct as JSON.Jon Skeet
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.
2015-08-03Format JSON for Duration and Timestamp.Jon Skeet
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.
2015-07-31Simplify the JSON tests for readabilityJon Skeet
Use ' instead of " in the expected JSON, then replace it before asserting.
2015-07-31Fix JSON formatting to always emit fields in field order, including oneofsJon Skeet
2015-07-20First part of JSON formatting for well-known types. I think we need a ↵Jon Skeet
reflection API rethink before doing the rest.
2015-07-17First pass at the big rename from ProtocolBuffers to Google.Protobuf.Jon Skeet
We'll see what I've missed when CI fails...