1. 09 Feb, 2016 1 commit
  2. 20 Jan, 2016 1 commit
    • Jon Skeet's avatar
      Ensure that FieldMask, Timestamp and Duration ToString() calls don't throw · dd43dcca
      Jon Skeet authored
      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.
      dd43dcca
  3. 13 Jan, 2016 1 commit
  4. 21 Nov, 2015 1 commit
  5. 03 Nov, 2015 1 commit
    • Jon Skeet's avatar
      Implement JSON parsing in C#. · fb248822
      Jon Skeet authored
      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.
      fb248822
  6. 04 Sep, 2015 1 commit
    • Jon Skeet's avatar
      Pack/Unpack implementation for Any. · e50461d8
      Jon Skeet authored
      We still need the JSON representation, which relies on something like a DescriptorPool to fetch message types from based on the type URL. That will come a bit later.
      (The DescriptorPool comment in this commit is just a note which will prove useful if we use DescriptorPool itself.)
      e50461d8
  7. 02 Aug, 2015 2 commits
  8. 31 Jul, 2015 1 commit
  9. 28 Jul, 2015 1 commit
  10. 22 Jul, 2015 1 commit
    • Jon Skeet's avatar
      First pass at making field access simpler. · 20bf6a56
      Jon Skeet authored
      This is definitely not ready to ship - I'm "troubled" by the disconnect between a list of fields in declaration order, and a mapping of field accessors by field number/name. Discussion required, but I find that easier when we've got code to look at :)
      20bf6a56
  11. 17 Jul, 2015 1 commit
  12. 16 Jul, 2015 1 commit
  13. 14 Jul, 2015 1 commit
  14. 10 Jul, 2015 1 commit
  15. 09 Jul, 2015 1 commit
    • Jon Skeet's avatar
      Minor fix-ups as suggested in PR #560. · 3cce11ce
      Jon Skeet authored
      - Added new line at the end of SampleEnum
      - Moved GeneratedMessageTest.GetSampleMessage to a new class, SampleMessages, and renamed it to CreateFullTestAllTypes.
      3cce11ce
  16. 30 Jun, 2015 1 commit
    • Jon Skeet's avatar
      Tidying up and extra tests. · f34d37a3
      Jon Skeet authored
      This is mostly just making things internal instead of public, removing and reordering a bunch of code in CodedInputStream/CodedOutputStream, and generally tidying up.
      f34d37a3
  17. 26 Jun, 2015 3 commits
    • Jon Skeet's avatar
      aa510414
    • Jon Skeet's avatar
      Tests for FieldCodec, along with a fix. · 286edc0f
      Jon Skeet authored
      286edc0f
    • Jon Skeet's avatar
      Tweaks and more tests for maps · c1283310
      Jon Skeet authored
      - Change the default message hash code to 1 to be consistent with other code
      - Change the empty list/map hash code to 0 as "empty map" is equivalent to "no map"
      - Removed map fields from unittest_proto3.proto
      - Created map_unittest_proto3.proto which is like map_unittest.proto but proto3-only
      - Fixed factory methods in FieldCodec highlighted by using all field types :)
      - Added tests for map serialization:
        - Extra fields within entries
        - Entries with value then key
        - Non-contiguous entries for the same map
        - Multiple entries for the same key
      
      Changes to generated code coming in next commit
      c1283310
  18. 25 Jun, 2015 1 commit
  19. 09 Jun, 2015 1 commit
  20. 13 May, 2015 2 commits
  21. 12 May, 2015 2 commits
  22. 01 May, 2015 1 commit
  23. 30 Apr, 2015 1 commit
  24. 29 Apr, 2015 3 commits
    • Jon Skeet's avatar
      Convert both the full and lite runtimes (and json/xml serialization assemblies)… · ce97e686
      Jon Skeet authored
      Convert both the full and lite runtimes (and json/xml serialization assemblies) to be Portable Class Libraries.
      All referring projects are now .NET 4 client rather than .NET 3.5.
      This commit also fixes up the ProtoBench app, which I'd neglected in previous commits. (Disentangling the two sets of changes would be time-consuming.)
      ce97e686
    • Jie Luo's avatar
      field presence Reflection and tests · c5c9c6a7
      Jie Luo authored
      c5c9c6a7
    • Jon Skeet's avatar
      Remove support for Serializable. · f651f73a
      Jon Skeet authored
      This could potentially be added back in later, but its use is limited and it's a pain in terms of support in PCL environments.
      One use that has been highlighted is passing objects between AppDomains; we'd recommend passing a byte array explicitly and reparsing on the other side.
      f651f73a
  25. 28 Apr, 2015 2 commits
    • Jon Skeet's avatar
      Updated set of unit tests and unit test protos. · ce66c5f1
      Jon Skeet authored
      This commit includes changes to the C#-specific protos, and rebuilt versions of the "stock" protos.
      The stock protos have been locally updated to have a specific C# namespace, but this is expected to change soon, so hasn't been committed.
      Four areas are currently not tested:
      1) Serialization - we may restore this at some point, possibly optionally.
      2) Services - currently nothing is generated for this; will need to see how it interacts with GRPC
      3) Fields beginning with _{digit} - see https://github.com/google/protobuf/issues/308
      4) Fields with names which conflict with the declaring type in nasty ways - see https://github.com/google/protobuf/issues/309
      ce66c5f1
    • Jon Skeet's avatar
      First part of making the C# runtime work with the new codegen. · f3504cf3
      Jon Skeet authored
      1) Remove CSharpOptions
      2) A new version of DescriptorProtoFile (with manual changes from codegen - it would otherwise be Descriptor.cs)
      3) Turn off CLS compliance (which we'll remove from the codebase entirely; I don't think it's actually relevant these days)
      4) Add "public imports" to FileDescriptor, with code broadly copied from the Java codebase.
      Lots more changes to commit before it will build and tests run, but one step at a time...
      f3504cf3