Jesse Wilson
89103b6d13
Rename RuntimeJsonAdapterFactory to PolymorphicJsonAdapterFactory
...
Also expand the documentation.
2018-10-20 00:47:48 -04:00
Jesse Wilson
1896e0f118
Merge pull request #697 from jocmp/master
...
Make RuntimeJsonAdapterFactory public
2018-10-19 23:33:06 -04:00
Jesse Wilson
6125d8c7b1
Don't decode into memory in RuntimeJsonAdapterFactory
...
Instead use our new flatten API to decode directly to the stream.
2018-10-19 12:07:58 -04:00
Jesse Wilson
f28bca609a
JSON flattening.
...
This is a new API that makes it possible to do more interesting things
with composition. It's currently write-only; doing composition on reads
is much more difficult.
2018-10-19 10:59:19 -04:00
Jesse Wilson
24ac43a799
Change RuntimeJsonAdapterFactory to peek for type names.
...
This is a bit awkward because JsonReader.Options doesn't tell you
what its values are.
Also awkward because we don't yet have an equivalent to stream
the encode of the value.
2018-10-09 23:10:31 -04:00
Jesse Wilson
fe22970973
Document how to register JsonAdapters
...
Closes: https://github.com/square/moshi/issues/698
2018-10-08 11:14:57 -04:00
Josiah Campbell
80f651a3eb
Make RuntimeJsonAdapterFactory public
2018-09-27 10:44:55 -05:00
Jesse Wilson
11241a2b02
Hide RuntimeJsonAdapterFactory for the forthcoming release.
...
We don't yet have the behavior we want for looking ahead at the type label.
2018-09-24 21:03:20 -04:00
Eric Cochran
810199a442
Disallow Object for RuntimeJsonAdapterFactory's base type.
2018-09-18 17:57:11 -07:00
Eric Cochran
67d07eb450
Add copyright header to EnumJsonAdapterTest.
2018-09-10 15:33:39 -07:00
Jesse Wilson
29bb93bc29
Include labels when encoding with RuntimeJsonAdapterFactory.
...
Otherwise the adapter is not symmetric.
2018-09-09 17:43:42 -04:00
Eric Cochran
8a8cde0ce3
Allow null fallback enum value in EnumJsonAdapter.
2018-08-31 00:51:34 -07:00
Eric Cochran
29bdc0aa45
Add EnumJsonAdapter to adapters module. ( #607 )
2018-08-07 15:05:56 -07:00
Eric Cochran
0f1fa3d385
Add RuntimeJsonAdapterFactory to adapters module. ( #606 )
...
* Add RuntimeJsonAdapterFactory to adapters module.
* Make RuntimeJsonAdapterFactory create null-safe adapters.
* Add copyright headers.
2018-08-06 04:35:53 -04:00
Eric Cochran
ee873b64f6
Remove unused import.
2018-07-26 17:28:15 -07:00
Jesse Wilson
5ad9d31bd8
Move modules into their own packages.
...
This sets the Automatic-Module-Name for moshi, moshi-adapters, and moshi-kotlin.
It moves moshi-adapters into its own .adapters package and forwards the existing
adapter. It moves the moshi-kotlin into its own .kotlin package and forwards the
existing adapter.
I'm not certain this is necessary or sufficient, but I think it's the right idea
for JPMS compatibility.
2018-02-07 04:41:06 -05:00
Eric Cochran
9deeb62e77
Add permalink to ISO8601Utils.java. ( #425 )
...
This file was removed from master a few months ago.
2018-01-10 21:57:00 -05:00
Eric Cochran
b7f771a70f
Add cause to malformed date string exception.
2017-06-20 00:15:11 -07:00
jwilson
1c6bebac1d
RFC3339 adapter.
...
Much thanks to Jackson for doing all the real work.
2015-09-26 18:51:50 -04:00