Commit graph

499 commits

Author SHA1 Message Date
jwilson
97fc14616d New APIs to reject unknown values. 2015-08-02 23:27:16 -04:00
Jesse Wilson
13b8a1ca55 Merge pull request #68 from square/jwilson_0802_atjson
New @Json annotation to customize a field's name.
2015-08-02 23:15:39 -04:00
jwilson
7890effcee New @Json annotation to customize a field's name. 2015-08-02 23:14:04 -04:00
Jesse Wilson
e515b92695 Merge pull request #62 from square/jwilson_0621_fail_messages
Nicer failure messages on partial adapters.
2015-06-21 15:33:57 -04:00
jwilson
d87bf52053 Nicer failure messages on partial adapters.
Closes https://github.com/square/moshi/issues/59
2015-06-21 15:32:27 -04:00
Jesse Wilson
4b7532bfb3 Merge pull request #61 from dave-r12/jsonreader-writer-javadoc-update
Update JsonReader & JsonWriter javadoc to use BufferedSource & BufferedSink
2015-06-20 10:35:23 -04:00
Dave Roberge
0ce7310caa Update JsonReader & JsonWriter javadoc to use BufferedSource & BufferedSink 2015-06-20 09:46:24 -04:00
Jesse Wilson
41ec6118fe Merge pull request #57 from square/jw/no-io
There is no I/O writing to a Buffer.
2015-06-17 10:11:38 -04:00
Jake Wharton
a25508a85e There is no I/O writing to a Buffer. 2015-06-17 00:16:03 -04:00
Jake Wharton
f00fd5f5c7 Add missing JSON highlighting to example. 2015-06-16 14:49:49 -04:00
jwilson
2d20d7731e Update release links. 2015-06-16 12:58:45 -04:00
jwilson
c6f030ba36 Updated changelog for 0.9.0. 2015-06-16 07:55:46 -04:00
jwilson
c9b2dbe395 [maven-release-plugin] prepare for next development iteration 2015-06-16 07:45:59 -04:00
jwilson
46a8a880e9 [maven-release-plugin] prepare release moshi-parent-0.9.0 2015-06-16 07:45:57 -04:00
Jesse Wilson
a1d2c3b40f Merge pull request #54 from square/jwilson_0615_docs
Initial round of Moshi docs.
2015-06-16 07:36:07 -04:00
jwilson
d01c5782c3 Initial round of Moshi docs. 2015-06-16 07:35:41 -04:00
Jake Wharton
4f660d4d23 Merge pull request #53 from square/jwilson_0614_name_to_value
New magic API to use type adapters for map keys.
2015-06-15 00:17:23 -04:00
jwilson
a3520730a0 New magic API to use type adapters for map keys. 2015-06-14 23:58:16 -04:00
Jake Wharton
a69c32741e Merge pull request #52 from square/jwilson_0613_object_adapter
Runtime type adapter.
2015-06-14 17:51:49 -04:00
jwilson
bb31ba18ca Runtime type adapter.
Closes https://github.com/square/moshi/issues/27
2015-06-13 13:06:09 -04:00
Jake Wharton
707f33226c Merge pull request #51 from square/jwilson_0609_jsonwriter_getpath
JsonWriter.getPath().
2015-06-09 23:22:48 -04:00
jwilson
39dc305a14 JsonWriter.getPath(). 2015-06-09 23:00:40 -04:00
Jake Wharton
b714a6749f Merge pull request #50 from square/jwilson_0607_json_data_exception
Throw JsonDataException consistently.
2015-06-07 22:33:08 -04:00
jwilson
dce373c37d Throw JsonDataException consistently.
We throw IllegalStateException when the application code is
internally inconsistent, such as when it closes and then writes
or similar.

We throw an IOException when the source JSON is structurally
invalid, such as when strings are unquoted in strict mode.

And we throw JsonDataException when the application code is
correct, and the JSON is well-formed, but the application code
and JSON disagree with one another.
2015-06-07 11:12:39 -04:00
Jesse Wilson
cf56907470 Merge pull request #49 from square/jwilson_0601_assertions
Use AssertJ instead of JUnit assertions.
2015-06-02 09:59:41 -04:00
jwilson
f829ac6ffb Use AssertJ instead of JUnit assertions. 2015-06-02 09:50:43 -04:00
Jake Wharton
31177586b1 Merge pull request #48 from square/jwilson_0601_nullable
Support @Nullable in Adapter Methods.
2015-06-01 01:06:18 -04:00
jwilson
236e8bd62f Support @Nullable in Adapter Methods.
When the annotation is present, the adapter method is used. When
it isn't, it isn't.
2015-06-01 00:32:14 -04:00
Jesse Wilson
2be42cfa0d Merge pull request #47 from square/jwilson_0531_json_qualifiers
New @JsonQualifier annotation.
2015-05-31 13:08:31 -04:00
jwilson
d6d9f9ead3 New @JsonQualifier annotation.
Works like JSR-330's @Qualifier annotation. You may have
multiple qualifiers, or none.
2015-05-31 13:07:21 -04:00
Jesse Wilson
629181ff8c Merge pull request #42 from square/jwilson_0525_adaptermethods
Adapter methods.
2015-05-25 14:46:50 -07:00
jwilson
71f0889842 Adapter methods.
This is a fun new API that could make writing JSON adapters
much easier.
2015-05-25 14:40:40 -07:00
Jake Wharton
171e3841bc Merge pull request #46 from square/jwilson_0525_enum_ii
Reject unrecognized enum constants with an exception.
2015-05-25 08:09:24 -07:00
jwilson
c8fd0e4bc2 Reject unrecognized enum constants with an exception.
Also promote enum adapter to StandardJsonAdapters.java.
2015-05-25 07:35:08 -07:00
Jesse Wilson
8003b6668b Merge pull request #32 from dandc87/ak_enum_support
EnumJsonAdapter
2015-05-25 07:25:09 -07:00
Jake Wharton
d14791d025 Merge pull request #43 from square/jwilson_0525_okio_substring
Save an allocation by using Okio instead of substring.
2015-05-25 07:02:20 -07:00
jwilson
912c07dafa Save an allocation by using Okio instead of substring. 2015-05-25 06:45:00 -07:00
Jesse Wilson
455fa47f9b Update README.md 2015-04-17 09:50:14 -04:00
Adam Koski
a0b177136d Squashed commit of the following:
commit f4e6b9aab54b270ca703794fde9370d00821dfca
Author: Adam Koski <dandc87@gmail.com>
Date:   Sun Apr 12 19:25:49 2015 -0700

    Add copyright headers and remove redundant test

commit 064dfbb5ec7c6ed8e60c91776ce0a4e90a29ff9e
Author: Adam Koski <dandc87@gmail.com>
Date:   Sun Apr 12 13:10:17 2015 -0700

    Fix error preventing merging

commit d80c00ef2b7220397dd074dd6ceb03b9be9ec416
Author: Adam Koski <dandc87@gmail.com>
Date:   Sun Apr 12 12:59:46 2015 -0700

    Switch to using name()

commit 7e68f21537a58843c0426c5e73028e12b0522b96
Author: Adam Koski <dandc87@gmail.com>
Date:   Sat Apr 11 22:37:25 2015 -0700

    Optimize enum value retrieval

commit 1422abd632ca147252f5b0698c8b19dc77ca3fac
Author: Adam Koski <dandc87@gmail.com>
Date:   Sat Apr 11 22:35:06 2015 -0700

    Add enum test for custom names

commit 8a7fefe28a98576f8db849fe83fb7973fefd1f12
Author: Adam Koski <dandc87@gmail.com>
Date:   Fri Apr 10 19:32:46 2015 -0700

    Add javadoc

commit 920b7c6883664df39d99eb206b933c4929157d84
Author: Adam Koski <dandc87@gmail.com>
Date:   Fri Apr 10 19:21:18 2015 -0700

    Rename class to match convention

commit 461e87aa02552e09d0c4a0feaf2971e6050aa994
Author: Adam Koski <dandc87@gmail.com>
Date:   Thu Apr 9 23:20:05 2015 -0700

    Add initial support for enums
2015-04-12 19:27:38 -07:00
Jesse Wilson
eece10d46e Merge pull request #35 from square/jw/expose-sink
Expose Sink as constructor type.
2015-04-12 15:36:32 -04:00
Marcelo Cortes
20ad5a5a4b Merge pull request #39 from square/jw/final
Switch types to be final.
2015-04-12 14:48:51 -04:00
Jake Wharton
a085548014 Use BufferedSink for reading. Sink writing convenience method. 2015-04-12 14:41:04 -04:00
Jake Wharton
9fedfc8066 Switch types to be final. 2015-04-12 14:29:18 -04:00
Jesse Wilson
41b3b0acde Merge pull request #36 from square/jw/token
Make token a nested type of the reader.
2015-04-12 06:07:07 -04:00
Jesse Wilson
9963e3bf09 Merge pull request #34 from square/jw/javadoc
Correct Javadoc code usage.
2015-04-12 06:02:16 -04:00
Jake Wharton
47cd73df89 Make token a nested type of the reader.
This is the only class which uses these tokens and it does not deserve a top-level type.
2015-04-12 00:57:14 -04:00
Jake Wharton
5e757e6f39 Correct Javadoc code usage. 2015-04-12 00:25:07 -04:00
Jesse Wilson
74871abd7f Merge pull request #25 from square/jw/omg-secrets
Add credentials for CI snapshot deployments.
2015-03-30 17:35:20 -04:00
Jake Wharton
573f2218d4 Add credentials for CI snapshot deployments. 2015-03-30 17:23:28 -04:00
Jesse Wilson
9d76bfc5ea Merge pull request #24 from square/jw/missing-link
Add missing README link to Sonatype snapshot repo.
2015-03-29 07:45:26 -04:00