Commit Graph

18 Commits

Author SHA1 Message Date
Haacked
47e67e9382 Reflection abstractions to reduce code duplication 2015-01-02 01:14:15 -08:00
Haacked
83bc99256a Add attribute to serialize strings as base64 encoded 2015-01-02 01:14:12 -08:00
Matt G. Ellis
d0dcbe8fb6 Allow [Parameter] to control JSON Field Names.
Previously, SimpleJsonSerializer.MapClrMemberNameToJsonFieldName
special cased the name "Links" since while that was the name of the
property in the object model, in JSON "_links" was used instead.

It turns out that there was an additional problem, where GitReference
wants to expose as Repository, but the name in JSON responses is
"repo".  Instead of simply adding another special case to
MapClrMemberNameToJsonFieldName, we update the implementation of the
serializer to allow [Parameter(Key = "some_name")] to denote what name
we'd like to use for the field in the JSON object when we serialize.
2014-11-17 23:55:37 -08:00
Brendan Forster
1edd8c377f patch the serializer for our silly OAuth response format 2014-10-06 16:05:44 -02:00
Brendan Forster
a19d2feb21 implement a lookup of the fields/properties which should serialize null values 2014-07-08 12:50:32 +09:30
Brendan Forster
2e47369b9b use opt-in attributes to indicate when a null property should be sent 2014-07-08 09:34:12 +09:30
Haacked
aaa010d790 Special case JSON _links property.
For some reason, the List Feeds http://developer.github.com/v3/activity/feeds/#list-feeds
API response has a field that starts with an underscore. This also occurs in
the Review Comments API: http://developer.github.com/v3/pulls/comments/#list-comments-in-a-repository
and in the Contents API. http://developer.github.com/v3/repos/contents/#get-the-readme

This commit special cases that one field so we can use the expected CLR
property name. I couldn't find a case where a
JSON response doesn't prefix "links" with an underscore.

Related to #386
2014-02-20 09:34:45 -08:00
Haacked
9257ba4f41 Some code style cleanup 2014-02-20 09:23:56 -08:00
Brendan Forster
09a0ea6c56 updated SimpleJson to 0.30.0 2014-01-23 14:49:35 -08:00
pltaylor
cf31e1da02 code review cleanups. 2013-11-13 19:53:52 -05:00
pltaylor
04349e6172 Strip '-' from strings coming in to be de-serialized. 2013-11-07 14:26:01 -05:00
Brendan Forster
b3ceb1d661 we should deserialize Urls in a specific way 2013-11-04 17:58:42 +11:00
Haacked
ad210cecc7 Implement IssuesClient and interface
This required updating our serialization strategy so we handle enums
better.
2013-10-23 14:46:19 -07:00
half-ogre
b437060b7d move reflection stuff to .Internal namespace 2013-10-08 15:16:27 -07:00
half-ogre
6f3fa81789 move internal stuff to .Internal namespace 2013-10-08 15:14:06 -07:00
half-ogre
0444f8630a omit null values from serialized objects 2013-10-07 17:06:20 -07:00
Haacked
91b5449ddd Removed fluent assertions 2013-09-23 17:41:04 -07:00
Haacked
997e955f38 Rename to Octokit to be consistent with other API libs
GitHub is naming all of the libraries Octokit for their respective
platforms
2013-01-29 14:00:27 -08:00