►
From YouTube: .NET Design Review: JSON
Description
Today, we're reviewing one open issue with JSON:
* https://github.com/dotnet/corefx/issues/36639
A
So
no
we
should
be
live
as
far
as
I
can
tell
at
least
there's
somebody
who
complains
and
shed
that
they
can
hear
us
I
assumed
this
all
works
out.
So
yesterday
we
reviewed
this
and
I.
Think
there's
notes
at
the
very
end
of
this
thing.
If
I
didn't
screw
it
up
well,
minimizing
certainly
does
not
help
my
case
I
press
the
wrong
button.
Yes,
I
do
press
the
wrong
button.
That's
why
so,
but
it's
basically
the
very
high-level,
very
wrong
notes
that
we
discussed
yesterday.
A
So
if
you
do
everything
by
object,
then
that
would
cause
some
boxing,
but
at
the
same
time
we
also
want
to
be
able
to.
You
know,
write
code
in
a
very
streamlined
fashion,
where,
when
you
have
effectively
an
object
model,
you
can
just
write
very
simple.
If
statements
to
say
if
this
type
do
this
at
this
type,
do
that
which
is
much
harder.
A
If
you
have
a
design
where
you
have
to
basically
either
have
custom
attributes
that
you
derive
for
more
custom
borders,
that
you
have
to
extend
or
every
single
time-
and
we
talked
a
little
bit
about
the
pros
and
cons
were
and
yesterday
we
had
another
meeting
after
the
fact
for
two
two
and
a
half
hours.
So
we
talked
about
that
as
well,
and
it's
not
that
straightforward
to
cook
up
a
design
that
can
square
these
few
things
in
a
straightforward
fashion.
A
So
one
of
the
questions
that
we
have
for
crystal
effectively
before
he
jumps
off
the
call
was:
could
you
provide
us
with
some
sample
code
of
the
you
know,
a
set
of
concrete
types
that
you
think
you
want
to
be?
You
know
handling
in
your
converters,
so
we
can
actually
use
it
as
a
concrete
example,
because
if
you
actually
care
about
boxing
or
not
boxing
about
your
types,
then
doing
this.
B
So
I
can
I
can
probably
provide
some
times.
Maybe
not
today.
I'm
super
swamped,
but
I
was
talking.
I
was
I,
am
in
with
us
on
yesterday
and
kind
of
to
first.
What
I
would
like
to
say
is
I
already
had
this
discussion
with
you
know.
Steve
this
feature
is
not
meant
to
I
mean
the
steriliser
is
not
meant
to
work
for
our
team.
In
this
release.
B
We
were
not
planning
on
it,
so
whatever
I
say,
take
it
with
a
grain
of
salt
I,
don't
understand
your
schedules,
you're
all
your
trade
offs,
all
your
scenarios,
all
your
customers,
but
from
perspective
of
my
team.
Basically,
what
we
want
is
we
want
to
have
full
control
over
the
shape
of
the
types
that
are
being
serialized,
including
you
to
watch
for
us
to
apply
any
attributes.
We
basically
want
the
types
to
look
like
any
other
type
in
the
BCL
that
is
not
JSON
serializable.
B
B
B
In
the
past
we
talked
it's
not
even
a
comparator,
maybe
you
know
the
feature
for
us
is
I
inherit
from
the
JSON
serializer
and
I
overwrite,
some
methods
that
that
do
whatever
the
converter
would
want
to
do.
We
wouldn't
mind
it
either.
So,
anyway,
those
are
the
scenarios.
I
can
send
you
some.
You
know
model
types
that
we
need
to
serialize
and
deserialize,
but
I
mean
you
can
imagine
they
are
usually
from
you
know:
1
2,
3
kind
of
levels,
deep
hierarchies,
so
maybe
one
outer
type
that
has
some
property.
B
B
Majorities
classes,
but
there
are
the
problem:
is
that
usually,
when
there
is
a
collection
of
items
and
the
items
are
kind
of
relatively
small,
we
would
make
them
struts
and
put
them
in
an
array
which
makes
it
much
cheaper
and
then
create.
Basically,
a
collection
of
heap
objects,
so
majority
of
classes,
but
they,
but
we
have
some
strats
and
they
tend
to
be
things
that
we
would
put
in
a
collection
which
makes
it.
You
know
they
are
rare,
but
there
are
many
of
them.
So.
D
So
what
I'm
hearing
from
what
I'm
hearing
from
Christophe
then?
Because
one
of
one
of
my
first
questions
is,
do
we
really
need
the
generic
or
could
it
just
be
typed
as
object,
and
so
what
I'm
hearing
from
Christophe
is
that
he
does
need
to
work
with
Struck's
but
they're
generally
in
collections,
so
it
might
be
okay,
it
might
be
okay
to
target
the
convertor
at
the
collection
type
rather
than
the
struct
type
itself.
Well,
as
long.
D
The
reason
why
I
bring
it
up
and
I
looked
at
James
as
sort
of
the
authority,
but
I,
don't
I,
don't
see
a
lot
of
customers
writing
struts
for
for
adjacent
data
it
just
it's
not
something
I've
seen
it's
not
something
that
you
come
up
a
lot.
The
case
that
I'm
primarily
concerned
about
when
we
talk
about
boxing
and
converters
is
in
ohms,
and
it's
not
it's
not
clear
to
me
the
degree
to
which
it's
a
requirement
that
whatever
we
do
for
enums
would
necessarily
play
by
the
rules
that
customers
have
to
play
by
right.
D
Like
it's.
Not
it's
not
clear
to
me
that
something
built
in
like
the
enum
from
enum,
as
string
converter,
has
to
play
by
the
same
rules.
I
think
it's
ideal
I
think
it's
optimal
I
think
it
helps
us
validate
the
design,
but
if
the
only
reason
why
we're
talking
about
generics
is
because
of
the
enum
converter-
and
we
think
that
there's
no
customer
scenario
for
it-
maybe
it's
best
to
simplify
the
design.
So
I
broke
the
enum
converter
based.
D
F
So
all
all
converters
and
jettisoned
on
it
to
boxing
pretty
much
Jason's
on
it.
It
always
works
with
object.
So
every
everything
does
boxing.
So
converters
aren't
special
and
that
regard
so
popular
use.
Cases
of
a
converter
with
an
enum
would
be
I
mean
popular
users
of
a
converter.
Worth
strikes
would
be
enumerations
and
also
date
times
people
wanting
to
customize
whether
they
ride
a
date
time
as
an
ISO
string
some
other
formats.
F
Maybe
they
wanted
to
write
it
out
as
text
since
sex
since
UNIX
epoch,
so
any
in
arms
and
date
times
are
probably
the
main
case,
but
anyone
can
come
all
right
come
along
and
overwrite
any
any
type
I
have
I
have
seen
rarely
people
override
how
doubles
and
this
moles
are
written.
Sometimes
people
want
to
write
those
out
as
a
string
just
because
JavaScript
always
handles
those
as
in
precise
types.
A
I
would
be
careful,
though,
to
use
that
as
a
as
a
justification
for
are
not
having
to
optimize
boxing,
because
the
one
of
the
primary
goals
we
go
for
is
performance
and
two-point
right.
So
if,
if
there,
if
there
occur
frequently
enough
in
particular,
payloads
like
the
SDK,
for
example,
that
might
not
be
viable,
so
I
mean
I
I'm.
A
Okay,
with
saying
we
make
it
harder
for
Crystal
to
write
that,
and
it's
not
like
a
you
know
the
fault
line
thing
that
somebody
else
would
have
to
do
to
let
say
through
their
own
like
polymorphic
types,
but
I
also
feel
like
I.
Don't
think
that
is
sufficient
data
to
say
the
design
doesn't
have
to
support
that.
Okay,
but
I
think
we
would
agree
the
view
that
we
need
to
follow
the
design.
That
is
simple
for
the
vast
majority
of
cases
and
the
vast
majority
of
our
customers
will
not
have
to
deal
with
drugs.
D
A
I
do
buy
your
argument,
though,
that
if
we
just
handle
collections,
maybe
that's
good
enough
alright.
So,
for
example,
if
stuff
can
just
intercept
the
connection
and
then
effectively
parse
the
video
types
as
a
as
a
full
loop,
which
means
they
don't
have
to
go
to
boxing.
That
might
be
acceptable
too,
because
yeah.
If,
if
the
concern
is
you,
you
avoid
a
location,
but
you
don't
completely
have
to
eliminate
them,
then
yeah,
maybe
collections
are
good
enough
for
it.
H
Also,
a
little
concerned
that,
if
what
Christophe
wants
is
to
not
decorate
this
night,
that
all
that
what
he
really
wants
is
some
sort
of
like
proxy
sideloading
feature
and
not
the
conservators
at
all
and
have
two
completely
different
feature.
And
we
should
make
sure
that
we're
not
complaining.
The
two
means.
B
F
The
the
purpose
of
converters
and
to
avoid
attributes,
although
you
could
you
could
use
it
like
that,
I've
always
seen
converters
as
an
escape
hatch
to
deserialize
er
YNN
sterilizer.
So
it's
quite
common
for
someone
to
start
serializing
a
type
hierarchy,
and
then
they
just
have
some
type
which
the
sterilizer
just
can't
produce
good
results
from.
F
D
What
Christoph
is
saying,
I
think
he's
actually
saying
something
a
little
bit
stronger
than
just
we're
not
going
to
use
the
attributes.
It's
that
his
types
are
not
going
to
be
pocos
they're
not
going
to
be
things.
What
will
sterilize
or
D
sterilize
in
some
orderly
way
like
there
is
types
in
the
Azure
SDK
are
going
to
be
designed
for
their
other
usages,
rather
than
being
designed
around
serialization,
correct,
correct
and.
B
So
basically
you
know
when,
when
these
types
come
from,
like
lager
definitions
of
you
know
azure
services,
and
there
are
some
properties
that
are
read-only
now
we
need
to
deserialize
the
payload
into
these
types.
So
we
want
to
make
the
properties
you
know
get
only
and
have
internal
setter
and
then
in
the
converter
we,
you
know,
the
converter
would
have
access
to
internal
ID
ice
and
we
would
set
those
properties.
F
At
least
worth
chastened
on
it,
when
you
place
a
a
Jason
property
attribute
on
a
property,
you
can
tell
the
steriliser
you'll
you're.
Okay
with
that
setting
internal
properties
like
that's
something
you
could
set
up
and
the
callback
api.
I
don't
know
if
we've
reviewed
that
yet,
but
there
might
be
someone
that
you
could
use
to
to
do
that.
B
Yeah,
if
we
could
provide
the
information
kind
of
out-of-band,
basically,
instead
of
writing
a
converter,
there's
some
callback-
and
we
say
here-
are
the
property,
some
of
them
I
internal,
but
go
ahead
and
set
them.
That
would
be
ideal.
But
that
gets
to
the
point
that
I
kind
of
made
just
a
moment
ago,
which
is
it
seems
like
we-
should
design
the
features
specifically
for
these
scenarios,
and
we
don't
have
time
because,
as
you
observed,
there
are
so
many
different
approaches
that
we
could
take
for
the
these
scenarios.
You
know
converters
have
these
trade-offs.
A
So
heavy
at
least
then
have
some
bullet
points
that
we
can
just
say:
what
scenarios
do
we
think
we
can
product
cast
this
API
set
forth?
What
we
all
say,
I,
don't
think
we
can
fund
the
entire
area
right,
I
think
that's
a
it's
a
statement
that
was
made
very
clearly
to
me
yesterday
that
we
need
to
have
support
for
on
rotors
in
general.
So
the
question
was
just
what
what
scenario
said?
Do
we
feel
comfortable
with
designing
an
API
for
I.
F
G
Custom
data
types
as
it
is
a
common
feature
right.
So
if
you
have
a
phone
number
type,
for
example,
a
struct
and
are
a
class-
and
you
want
to
be
able
to
use
that
in
your
vocal
there's,
no
way
to
do
that
without
this
converter
model
or
a
converter
model,
you'd
have
to
write
it
as
a
string
and
a
string
property
and
right
now.
A
Yeah
I
get
that
I'm
I,
guess
what
I'm
trying
to
get
it
it's
like.
Can
we
let
me
be
more
specific
than
just
that,
but
because
constant
data
types
is
very
open-ended
because
otherwise
you
would
have
to
say
something
like
well.
Do
we
support
factories?
Do
we
support
immutable
objects?
Do
we
support
effectively
reading
a
mutating
private
state,
somehow
right
and
I?
A
Think
that's
the
thing
there
and
I
think
that's
a
general
other
question
of
like
Wired
enough
and
I
think
what
we
all
lean
towards
is
attributes
would
probably
be
nice
for
some
people
as
in
as
a
convenience,
but
we
need
to
have
a
mechanism
to
a
wire
to
converter
above
out
having
to
do
anything
to
the
type
itself.
Yeah.
D
I
would
I
would
specify
that
I
think
that
those
are
the
base
requirements.
Yeah
like
you
need
it.
You
need
a
way
to
take,
take
control
of
the
reading
and
writing
of
something,
and
you
need
a
way
to
wire
it
up
with
an
attribute,
because
it's
the
most
convenient
and
obvious
thing
to
do
most
of
the
time,
and
you
need
a
way
to
wire
it
up
globally,
in
the
case
that
it's
something
you're
going
to
be
using
all
over
the
place
and
both
of
those
things
feel
really
good.
D
Think
I
think
the
first
question
is:
is
do
people
like
assuming
that
there's
a
JSON
converter
class,
the
two,
the
two
methods
that
matter
for
Jason
converter,
try
read
and
try
right
as
far
as
what
does
the
converter
do
and
how
does
it
work
the
other
stuff
here
everything
else
in
this?
These
notes
is
all
have
to
do
with.
How
is
the
converter
wired
up
so
what
I
think
so?
This
can.
B
B
So
let's
say
you
know,
maybe
that
500,
but
let's
say
we
would
have
30
and
I,
really
worry
about
performance
of
having
a
chain
of
30
converters
to
deserialize
an
object
graph,
because
basically
the
chain
needs
to
kind
of
you
know
it
needs
to
be
managed.
It's
20
converters,
I,
don't
know
what
the
heuristic
or
what
the
algorithm
is
to
select,
which
one
goes
for
the
next
you
know
tries
to
deserialize
the
next
chunk
of
JSON.
So.
D
B
Yes,
it
is
yes,
so
mate.
The
point
was
that
if
we
wanted
to
kind
of
you
know
yesterday
we
discussed
would
it
be
possible
to
create
one
converter
to
get
that
connects
tree.
Deserializing
utilize,
many
types
not
belonging
to
the
same
hierarchy
anyway.
So
that's
my
need
to
write
so
Canterbury
you
can
aggregate
whatever
you
want.
A
Yes,
I
think
they're
great
thing
we
discussed
yesterday
for
two
hours
after
the
meeting
was
given
this
design
point
that
we
just
talked
about
about
classes
versus
tracks.
One
option
was
well
what
would
object?
Look
like
they
didn't
catch
that
there's,
not
one
that
we
sketched
up.
We
said
what,
if
we
make
the
method
itself,
generic,
not
the
type
and
then
effectively
allow
it
this
way.
A
Basically,
you
you
you
return,
can
convert
true
for
some
types
and
then
the
caller
effectively,
the
the
the
detail
at
that
will
basically
call
the
try
greed
versus
try
ride
with
the
correctly
instantiate
a
generic
type,
and
then
basically,
your
implementation
just
has
to
who
will
switch
over
the
type
you
were
invoked
for,
both
of
which
result
in
different
ugliness
right.
Some
of
them
is
just
yeah.
A
Okay,
it's
just
casting
what
casting
is
relatively
clean
when
you
just
deal
with
object
instances,
and
the
only
thing
you
care
about
is
you
know
getting
into
different
video
out.
It's
a
bit
more
complicated
when
you,
when
you
don't
want
to
do
this
for
generic
reasons,
then
it
explodes
pretty
badly
but
yeah.
We
could
probably
hide
that
behind
effectively
a
custom
class
hierarchy,
where
we
give
you
multiple
converters
that
you
would
extend
from
and
then
one
of
the
basic
be
the
easy
one.
A
It
might
be
that
you
know
no
no
reading
effectively
super
small,
you
know
four
byte
bail,
you
know
become
politically
expensive,
potentially
right
or
eight
byte
wagons
or
whatever,
but
because
you
keep
copying
them
all
over
the
place.
So
there
are
some
issues
around
ed,
where
it's
unclear,
whether
it's
even
viable
to
have
a
design.
No
matter
how
you,
how
you
do
that,
and
so
maybe
just
one
thing
has
to
go
I.
Also,
it's
a
decimal.
D
So
I
have
a
I,
have
a
question.
Kristof
scenario:
I
didn't
get
that
yeah
I!
Didn't
you
ask
a
question
before
you
left
for
Christoph
scenario?
Doesn't
that
just
work
if
you're,
like
converter
type
like
it's,
assuming
that
we
do
what's
on
the
screen
right
now
and
I'm,
not
saying
that
it's
perfect
or
that
it's
done
right,
but
assuming
that
we
do
a
design
where
the
Jason
converter
has
a
t
in
the
type?
Isn't
the
type
of
Christoph's
converter,
like
Jason
converter
of
object
and
like
we're.
D
E
C
E
A
Roll
back
I
think
the
problem
that
Christopher's
pointing
out
is
that
say
you
have
to
handle
thirty
primitive
types
right.
The
question
now,
if
you
have
thirty
converters-
and
you
have
thirty
instances
that
return
true
from
can
convert
for
various
types,
then
how
expensive
gets
that,
but
also
how
noisy
is
it
in
his
code
chain?
Because
the
thing
what
he
still
envisions
is
you
have
one
converter,
you
call
it
the
address
decay,
converter,
there's
no
T
involved.
A
You
just
have
a
method
where
you
say:
try
read
or
try
writing
you
to
switch
over
the
type
and
then
do
the
casting
right
like
and
I
think
we
can
all
agree
that
that
generally
works.
If
you
can
agree
on
the
time
being
object
because
then
you
just
cut
right
as
soon
as
you
say,
I
don't
want
to
do
that.
Then.
Basically,
the
only
design
that
would
work
for
Christophe
is
there
is
no
T
in
the
converter
itself.
A
The
T
is
in
the
method,
so
the
method
itself
is
generic
and
the
cylinder
framework,
basically
instantiates
the
method
for
the
particular
T
that
it
passed.
Who
can
convert
it
in
there
to
turn
to,
and
then
you
implementation
of,
try
read
of
T
and
try
right
of
T
basically
does
the
is
T
type
equals
type
of
blah
then
goes
that
co
path
right,
but
that
that
becomes
extremely
ugly
cold
because
you
basically
cannot
convert
one
generic
type
to
another.
You
have
to
go
by
object
and
it's
it's
not
super
straightforward
code
to
Ryan.
A
A
I
D
D
A
A
The
Ryan's
point,
but
if
the
cold
side
caches,
why
do
we
care?
It
just
means
that
his
code
is
now
in
30
classes
rather
than
in
one
method.
That
is
really
long,
which
I
can
see
not
being
the
most
elegant
solution
for
in
this
case.
But
if
you
actually
go
through
the
like,
if
he
really
cares
about
not
boxing,
then
his
hole
is
not
going
to
be
pretty
if
everything
is
in
one
method
either
precisely.
D
E
D
Really
important
to
understand
that
can
converters
can
convert
is
designed
to
be
something
that
the
serial
their
calls
once
per
once
per
type
for
convertibles
sure
it's
not
intended
to
be
of
her
peruse
overhead
or
anything
like
that
and
like
you're,
not
going
to
have
a
giant
list
of
converters
registered
by
the
framework
by
default
or
anything
like
that.
So
I
think
I
think
drilling
into
can
convert
and
the
scalability
of
having
many
converters
is
a
bit
of
a
red
herring
like
I.
D
Think
I,
think
we've
kind
of
all
feel
good
about
that
detail
of
the
design.
I
also
want
to
mention
what
happens
if
you
D
invent
can
convert,
because
the
first
version
of
this
did
not
have
can
convert
and
you
run
into
you
run
into
a
bunch
of
problems.
If
you
don't
have
some
way
for
the
user
or
the
developer,
who
wrote
the
converter
to
programmatically
inspect
the
type
and
make
their
own
decision
so.
A
D
Type,
it
is
so
the
reason.
So
the
reasons
why
are
you
might
want
to
register
a
converter
for
a
category
of
types
like
say
all
the
enums
which
in
vote,
which
includes
types
that
you
can't
name
you
can
only
inspect
with
programmatic
logic
or
something
like
F
sharps,
discriminated
unions
or
say
an
open
generic
James.
J
E
C
G
I'll
just
walk
through
this
really
quick
here,
so
the
Semien
converter
is
just
you
know,
true/false
unknown,
and
they
want
to
have
custom
jason
for
that.
So
in
this
case
a
simple
just
basically
derived
from
jason
converter
and
pass
in
your
your
name,
your
email
and
we
can
skip
over
the
read
and
the
write
for
now.
That's
just
a
boilerplate
reader/writer
code.
G
And
here's
a
test
for
the
so
here
when
you
add
it,
you
know
in
this
case,
there's
no
generics,
nothing
just
do
it
up,
and
you
know
it
works
as
you
would
expect.
C
G
I
have
a
sample
later
for
that
yeah,
so
the
polymorphic
pokel
converter
yeah
scroll
down
for
that.
This
is
interesting
one
here
we
don't
support
polymorphic
tea
serialization
by
default.
Somebody
can
do
this
if
they
want
so
here's
a
simple
object
model
in
this
case
there's
an
enum
type
discriminator
just
as
an
inner
class
for
now,
and
if
you
look
at
the
can
convert
it's
this
is
you
know?
One
of
the
important
things
about
can
convert
here
is
yeah.
G
Like
rhinos
saying
this
is
programmatics
having
a
simple
you
could,
probably
you
know:
do
it
some
other
way,
but
it's
basically
saying
if
your
person
then
I
can
convert
you.
G
So
if
you
just
want
to
scroll
down
to
the
test
here
again,
we
we
just
new
up
a
person,
converter
or
the
same
way
we
did
with
the
enum
and
everything
works
as
it
as
you'd.
Think
and.
G
G
This
turnout
is
pretty
self-explanatory,
but
here's
an
attribute
since
since
this
particular
converter
accepts
an
offset
coordinate
offset
and
if
you
want
to
use
an
attribute
to
be
able
to
specify
that
this
attribute
takes
set
offset
and
in
the
get
converter
method
on
the
attribute
here.
Just
simply
news
up
to
on
point
converter
will
ask
for
that
and
pass
asking
in
that
coordinate
offset.
G
So
the
class
here
there's
a
sample
class.
It
has
a
point
on
the
bottom
of
the
screen
here
and
that,
that's
just
saying,
add
10
to
the
point.
So
if
you
look
at
the
test,
it's
just
adding
10
to
the
1
and
the
2
that
were
passed
in
to
get
you
know
11
and
12.
So
this
is
an
example
that
that
you
know
if
your.
If
your
converter
has
additional
arguments
on
like,
for
example,
a
hypothetical
email
converter
would
have
treated
string,
maybe
a
low.
You
know
in
sand
and
strings
something
like
that.
G
C
G
Here
the
list
converter,
what
state
so
this
is.
This
is
a
tricky
one
where
you
have
to
do
this
behind
your
model.
I
think
this
is
gonna,
be
rare
for
people
to
do
this,
but
if
you
screw
up
a
little
bit
more,
so
we
get
that
top
line.
G
Okay,
so
here
here
you
derive
from
this
binder
class.
This
is
the
factory
class
there's
some
naming
TBD
on
this.
We
also
discuss
having
a
different
type
hierarchy,
but
this
is
the
guy
that
that
says.
Ok,
you
know
you're
gonna
pass
me
type
later
and
in
a
good
converter
and
I'm
gonna
create
the
real
generic
type
for
you,
but
this.
C
G
The
type
that
people
add
to
the
options
you
don't
ever
see
these
other
generic
types,
they're
just
cash
white
and
a
hidden
by
the
framework
right.
So
here
it's
just
saying:
hey,
if
you
can
convert
says
if
your
list
of
T
and
T
is
inter
long,
then
I
support
you
and
then
get
convertor
down
below
says.
You
know
the
ugly
activator
Creed
instance
code
to
treat
that
the
real
Jason
converter
of
T,
which
is
on
below.
So
this
is
the
actual
disc
converter.
What's
open
generic
so.
C
A
I
think
in
this
case,
the
way
you
would
do
this
is,
you
may
have
multiple
things
that
are
built
by
this
miner
model,
but
they
could
not
handle,
like
you
know,
effectively
disjoint
classes
right.
So,
for
example,
you
can
say
you
have
one
converter
for,
but
this
particular
class
hierarchy.
You
have
another
class
hierarchy
of
a
different
converter.
Then
we
have
a
set
of
primitive
ties.
We
just
have
one
of
them
right.
So
then.
A
B
C
C
J
So
they
you
you
would
you
would
have
a
my
type
converter
of
tea
and
then
you
would
have
the
same
thing
where
you've
got
priory
of
tea.
But
if
you
wanted
to
specialize
what
you
did
for
me,
you
would
say
if
typeof
t
equals
type
of
it,
then
prior
e-reader
type
options
out
in
value
and
that's
another
method.
It's
a
private
method
on
the
same
class
that
handles
in
specifically
and
centralized
at
that
point,
can
you
do
the
same
thing
for
you
and
you've
been
this?
My.
C
I
Forces
in
a
what
he,
what
the
other
stuff
would
probably
want
to
do.
I
had
applying
this
to
just
have,
because
his
list
of
types
is
finite
and
on
that
front
he
would
probably
just
have
a
static
dictionary
and
then
did
not
static
dictionary.
Instead
of
using
the
function
he
chose,
it'll
it'll
just
be
lower
yeah.
I
I
G
You
registered
this
this
generic
converter,
so
you
know
options
and
you
had
you
know
the
none
generic
converter
on
for
a
while
I
had
I
had
a
different
model
where
you
were
noop
up
directly:
the
generic
version
of
the
converter
and
passing
a
placeholder
on
like
a
like
object
and
that
kind
of
worked
but
I
know
it
doesn't
handle
all
scenarios.
So
that's
why
there's
two
classes
here,
one
for
the
binder
and
one
for
that.
J
G
If
they
have,
if
they
have
one
that,
doesn't
you
know,
use
generics
or
whatever
it
looks
the
same,
they
just
knew
it
up
and
I
that
reason,
I
think
I
know
we
had
this
discussion
yesterday,
a
little
bit,
but
I
didn't
realize
at
the
time
that
we
need
a
common
base
class,
because
we
want
one
list
to
contain
all
other
converters,
whether
these
the
special
binder
one
or
just
a
normal
one,
because
order
is
important
and
we
don't
want
to
have
two
different
lists
and
try
to
figure
out
ordering
between
them.
G
D
F
No,
that
would
that
would
never
work,
so
one
important
thing
to
keep
in
mind
with
these
converters
as
they're
working
with
Jason
reader
and
Jason
writer.
Those
are
forward
only
api's.
So
if
you're,
if
you
write
to
jason
writer
and
then
you
decide
halfway
through
the
converter,
isn't
working
for
you,
you
can't
really
undo
that
right.
F
So
these
converters
don't
cooperate
like
a
converter,
could
call
another
converter
or
a
kekulé
was
serialized
or
materializer
could
invoke
another
converter
in
a
nested
fashion,
but
you
would
never
have
two
converters
running
at
the
same
time
on
the
same
Jason
on
to
produce
the
same
type.
Generally,
only
one
converter
is
executing
at
a
time
I.
D
Would
also
say:
tuners
Tanner's
question
is
not
at
all
about
an
exotic.
It's
not
at
all
about
an
exotic
scenario
like
plan
failure
is
definitely
an
option.
This
is
you
would
return
false.
Unlike
invalid
data
or
something
like
battery,
you
could
return
false
for
invalid
data
so
like
this
is
a
thing
that
will
happen
and
it's
part
of
the
design
do.
G
The
open
issues
section
provides
some
mechanism
support
that
if
you
try
to
throw
your
adjacent
exception,
unfortunately,
you
won't
get
the
path
inserted,
because
the
reader
and
writer
don't
have
the
path
on.
That's.
I
C
D
I
think
it's
I
think
it's
also
ok
if
we
were
to
like
catch
and
we
throw
catch,
and
we
throw
Jason
exception
with
additional
context,
but
to
to
Austin's
point
that
that
is
a
concern.
That
is
something
that
we'd
like
to
avoid
is.
We
would
like
to
avoid
turning
IO
exception
into
Jason
exception,
because
the
expectations
for
handling
Jason
exception
are
that
there
was
invalid
data,
not
that
reading
the
data
failed
right
or
not
that
reading
from
the
stream
failed.
Why.
J
Can't
we
have
a
Jason
serializers
or
exception,
which
inherits
will
Jason
exception.
That
explicitly
indicates
hey.
This
was
a
serialization
exception
and
the
serializer
could
have
provided
more
info
in
the
inner,
except,
which
is
how
I
think
most
people
would
expect
that
they
have
been
propagated
up.
D
I
And
with
my
comments,
I'm
not
really
trying
to
be
prescriptive
per
se.
Really
what
I'm
trying
to
get
at
is
the
it
in
a
scenario
where
a
method
returns
false
like
because
all
of
the
return
be-because
control
pro
gets
funneled
into
a
single
location,
it's
impossible
to
tell
what
actually
led
to
that
returning
false,
which
means
you
can
never
ever
show
a
useful
error
message
to
the
user.
All
you
know
is
something
somewhere
am
I
wrong
deal
with.
G
J
The
key
point
is
it's
completely
fine
to
get
Jason
information,
but
this
area
like
if
I'm
debugging,
my
code,
I,
don't
want
to
have
to
guess
at
where
it
failed
or
anything
else.
I
want
to
be
able
to
get
a
clear
exception.
That
says,
like
hey,
the
serializer
failed
and
here's
the
additional
information
that
the
converter
provided.
Positional.
J
Still
I
still
think
it'd
be
better
just
to
catch
exceptions
in
general
Imran.
This
serializer
failed
because
an
exception
was
thrown
an
unhandled
exception
was
thrown
till
you
wrap
it.
That's
what
inner
exception
is
for
it's
for
saying.
I
cap
I
encountered
an
unhandled
exception
where
I
didn't
expect
it.
So
here's
my
failure
mode
and
he
was
the
failure
mode
that
caused
that
that.
J
E
D
Right
downside
the
downside
to
wrapping
them
is
the
fact
that
we
have
adjacent
exception.
It
all
becomes
useless
because
now,
if
you
handle
Jason
an
exception
because
you're
interested
in
doing
something
with
the
error
about
the
bad
data,
you
have
to
now
look
at
the
inter
exception
and
try
to
try
to
like
implement
complicated
logic,
to
figure
that
out
so
like.
D
J
D
So
and
so
the
topic,
the
topic,
like
the
decision
point,
seems
to
be
because
we
have
to
do.
We
have
to
specify
this
behavior,
whether
or
not
whether
or
not
we
use,
try,
read
or
or
read.
We
have
to
specify
this
behavior
regardless
right,
because
the
writer
will
still
throw
except
the
reader
and
writer
will
still
throw
their
exception.
C
D
We
want
the
steriliser
to
provide
the
additional
context
where
possible,
so
what
we
had
going
so
far
that
I'm
still
happy
with
that
I
think
works
and
fill
the
fills
the
requirements
before
and
after
this.
This
design
change
is
that
the
serializer
will
catch
Jason
exception
and
will
either
wrap
it
in
an
additional
JSON
exception
or
create
a
new
JSON
exception,
with
with
the
additional
context
of
the
property
path
in
the
model
like
that
satisfies
all.
The
requirements
like
what's
important
is
that
the
steriliser
does
not
catch
and
we
throw
IO
exception.
I
would.
A
Agree
shouldn't
that,
because,
honestly,
like
the
the
way
I
see
it
is
like,
if
you
have
invalid
Jason
right,
then
one
of
the
converters
might
decide
to
throw
this
exception
because
the
Jason
is
bad.
They
don't,
then
anything
that
happens
is
effectively
failed
for
that
request,
but
effectively.
At
that
point,
your
request
is
done.
It
waits
to
be
500
because
something
in
your
stuff
is
not
kosher.
Right.
I.
A
Other
areas
like,
for
example,
what's
the
thing
called
target
exception
thing
is
they're
basically
of
reflection
throws
we
do
invoke,
you
know
it's
largely
and
we
shouldn't
have.
We
should
have
never
done
that.
We
should
have
just
forwarded
the
underlying
exception,
because
no
effectively
it's
you're
you're
you're,
basically
making
it
way
harder
people
to
get
access
to
the
actual
call
stack
to
the
actual
data,
because
the
exception
you're
getting
is
almost
never
the
one
you
want
I,
don't
care.
A
I
A
I
I
D
That
we're
going
for
is
writ
broadly
as
a
person
who
initiates
adjacent
operation.
I
want
to
know
if
that
operation
failed
due
to
bed
too
bad
data
like
if
I'm
writing
a
wind
forms
app
and
it
fails
due
to
a
file
not
existing
on
disk
there's.
A
different
air
handling
scenario
than
the
file
is
corrupt
and
I
would
provide
a
different
error
message
to
the
user.
So
it
sounds.
I
D
D
That's
brought
up
here
right
like
it's:
it's
not
desirable
to
have
converter
authors,
catch
Jason
exceptions
and
there
we
throw
them
or
return
false,
like
neither
of
those
things
is
desirable
yeah.
So
if
we
feel
like
the
method,
if
we
feel
like
untried
these
methods
and
saying
you,
you
throw
an
exception
to
indicate
bad
data
and
by
the
way
you
throw
adjacent
exception
to
indicate
bad
data.
So
let's
say
that
a
required
property
is
missing.
You
can
throw
Jason
exception
for
that,
like
that
seems
good.
D
I
Or
or
if
you
want
to
leave
the
current
API
shake
you
can
make
that
same
claim,
you
would
say,
return
false
give
them
only
if
the
data
was
bad
effectively
for
everything
else.
Their
own
exception
I
mean
it's
basically
another
way
of
saying
what
you
said
only
instead
of
changing
the
exceptions
like
you
return,
false
yeah.
A
The
downside
of
returning
false
is
you,
don't
have
a
way
to
include
information
right,
so
if
the
implementation
of
try
read
is
effectively
an
INT
parse,
that's
probably
ok
right!
If
you
try
read,
is
reading
this
super
complicated,
structured
object.
Maybe
that's
not
enough,
because
now
you're
like
deep
in
the
bowels
of
something
you
want
to
convey
to
the
caller.
You
know
I
feel
like
at
this
point
and
it's
not
super
useful.
You
just
return
false
at
that
point.
Right,
yeah.
D
And
they're
not
and
they're,
not
purely
binary
choices,
because
you
could
throw
a
JSON
exception
in.
If
we
go
with
try
read
you
could
still
throw
adjacent
exception.
That
would
be
fine
like
that,
would
work
fine.
It
doesn't
break
the
design.
It's
just
that
saying.
Putting
try
read
their
encourages
you
to
do
two
things
that
seem
non
optimal,
which
is
to
destroy
information
when
you
do
encounter
an
error
by
not
reporting
it
and
just
returning
false
and
also
it
seems
to
encourage
you
to
do
your
own
exception,
handling,
which
we
want
people
to
avoid.
G
H
So
does
the
lessons
the
design
where
the
converters
are
going
to
be
put
in
series
and
you're
gonna?
Do
the
try
read
and
then
go
to
the
next
one?
If
it
returns
false,
then
it
should
just
be
read
and
throw
partially,
because,
even
though
we
have
very
clear
guidance
on
what
the
tribe
means,
which
is
only
return
false
for
one
kind
of
handling
scenario
and
throw
for
everything
else,
a
lot
of
people
think
it
means
never
throws
exception.
H
D
H
Like
try,
the
Tri
API
is
my
API
czar,
a
thing
that
just
a
lot
of
people
have
trouble
with
they
seem
to.
They
seem
to
believe
it
because
instead
tryparse
never
throws
less,
assumes
that
try
means
don't
throw
and
then,
when
they're
calling
it,
they
think
it
means
it
never
throws
and
they
have
trouble
with
it.
C
C
I
Going
to
happen
in
practice,
as
mentioned
earlier,
is
that
people
are
going
to
write
converters
they're
going
to
call
into
doc
parse
inside
the
converter,
not
try
parts
of
the
parse
and
the
thing
is
just
going
to
throw
an
organ
exception
and
whoever's
consuming
at
their
try-catch
jason
serializer
exception.
The
exception
will
just
blow
through
that
an
agency
be
500.
The
response,
like
that's,
what's
gonna
happen
in
practice,
regardless
of
what
we
say
in
this
room
like
we
can
work
around
that
right,
which.
J
J
C
I
C
D
J
D
A
C
F
The
common
case
is
you,
you
run
out
of
data,
so
you
call
Reed
and
Reed
returns,
false
and
actually
I,
guess
I
guess
with
these
converter
types,
you're
you're
reading
ahead
and
that's
the
difference
compared
to
Jason,
don't
yet,
but
at
least
with
Jason
Donette.
After
each
time
you
call
it
Reed.
You
need
to
check
whether
it's
false,
then
you
throw
an
error.
D
H
C
I
A
A
What
was
the
question
so
basically,
the
question
is:
if
we
decide
that
Erik
is
basically
handled
by,
we
just
call
an
API
on
that.
It
rose
from
a
performance
standpoint
that
might
be
okay
because
errors
are
sufficiently
rare.
But
if,
if
basically
error
handling
also
includes
effectively
when
you're
out
of
data,
does
that
mean
that
basically,
the
cylinder
that
has
the
outer
loop?
That
says
you
know
you
know,
keep
serializing
and
if
I'm
out
of
data,
then
you
know
get
a
bigger
buffer,
read
more
data
and
then
see
lies
again.
How
does
that
work
today?
G
The
serializer
will
handles
the
the
serializer
handles.
Okay,
assuming
you
don't
have
any
converters
it'll
detect
whether
you
run
out
of
data,
because
the
reader
would
say
false
on
a
read
and
then
it
just
unwinds
itself
and
doesn't
read,
and
then
you
know
kind
of
continues
where
it
left
off,
right
and
and
actually
James
made
a
good
point
kind
of
to
earlier
about
Auto
data,
because
we
now
guarantee
for
these
particular
converters
will
not
run
out
of
data.
A
lot
of
the
false
statements
that
I
have
in
these
samples
could
just
go
away.
D
I'm
not
sure
that
everybody
on
the
call
totally
understood
that,
like
what
the
guarantee
that
the
serializer
provides
for
both
really
like
for
reading
is
that
the
serializer
will
have
pre
buffered
till
the
end
of
the
current
like
value.
So
if
it's
a
single
Jason
value
like
a
string,
it
will
have
pre
buffered
that
string.
If
it's
a
object,
it
will
have
pre
buffered
the
entirety
of
that
object,
and
if
it's
an
array,
it
will
have
pre
buffered.
D
That
array
and
the
reason
is
because
it's
not
really
reasonable
for
user
code
to
write
an
async
Jason
converter,
which
is
what
would
be
required
like
this
design,
would
be
15
times
more
complicated
if
we
were
talking
about
a
async
converters.
So
when
you
write
a
converter,
you
have
to
guarantee
that
there
is
enough
data
available
for
you
to
complete
reading.
Whatever
the
current
thing
is.
G
Intrigue,
we
only
have
to
do
that
in
certain
case
in
cases.
So
it's
a
separate
side
discussion.
We
can
have
later
whether
we
want
to
do
that
in
every
single
case
or
not,
and.
C
G
Yeah
I'm
just
taking
a
male
form
Jason
and
you
don't
run
out
of
data
necessarily
because
the
buffer
is
complete,
but
is
malformed,
and
you
know
you,
you
still
have
to
check
for
your
own
false
when
you
don't
have
a
stream.
Currently
I
mean
in
the
current
prototype,
because
we
do
not
read
for
performance,
went
unless
you're
in
a
stream.
I
C
I
That's
actually
one
of
the
things
I
wanted
to
talk
about
if
we
were
ready
like
what
does
it
actually
look
like
to
write
one
of
these
things,
so
we
try
lead
method
that
we
were
just
looking
at
on
the
screen
earlier
career
on
list
converter,
our
jurors,
when
I
was
looking
out.
I
was
wondering,
like
that's,
that's,
obviously,
very
verbose,
because
it's
trying
to
handle
a
bunch
of
different
things
and
my
two
questions
are
a.
What
would
it
look
like
to
minimize
that,
if
possible
and
B
is
it
complete
even
as
perverse
as
it
is?
I
C
I
But
so
you
said
it
depends
on
something
that's
external
to
the
converter,
so
that
means
a
converter
presumably
needs
to
special
Haysom,
because
the
converter
doesn't
control
the
options
being
passed
them,
and
so
does
that
mean
every
single
example
that
we
ever
write
of
a
converter
needs
to
potentially
handle
a
comment.
Absolutely
everywhere,
I
mean.
G
F
D
We
also
discussed
this
already,
while
we
were
doing
the
design
and
I
thought
that
we
landed
in
the
place
of
I
thought
that
we
planted
in
the
place
of
the
seer
eliezer
by
default,
passing
the
option
to
the
to
the
reader.
That
says,
just
don't
tokenize
comments
like
don't
give
them
to
me
as
tokens,
so
this
here
isn't
that,
where
with
mandamus
so.
I
But
the
serializer
by
default
will
say
no
comments
because
it
wants
to
be
compliant
with
the
Jason
specification.
But
you
could
you
could
change
the
options
to
say
either
I
want
to
allow
comment
and
drop
them
as
trivia,
which
is
probably
what
ASP
nuttin
up
and
out
your
mothers
will
do
and
there's
also
the
option
to
say.
I
want
to
allow
comments
and
I
want
the
reader
to
actually.
C
D
C
C
C
G
E
G
E
I
mean
that
that's
I'm,
saying
is,
that
makes
it
relatively
easy
for
the
converter
is
like,
then
you
just
passed
I
mean
that's
what
we
do
for
getting
JSON
element
out
right
now,
as
we
use
JSON
document
parse,
it
don't
do
anything
and
they,
the
other
people,
would
just
take
that
and
then
break
it
apart.
If.
G
You
want
an
easy
model:
I
think
that
would
be
a
different
type
of
converter
and
we
would,
you
know,
have
callbacks
on
property
names
and-
and
you
know,
skip
properties
that
have
the
ignore
attribute
on
them,
and
things
like
that
again.
I
think
JSON
talking
that
deals
with
what
I
mean
I'm
just
saying
it.
We
wanted
to
actually
make,
instead
of
trying
to
thinking
about
making
this
converter
easier,
to
implement.
E
We
can
think
about
I'd
say
that's
a
mitigation,
as
we
say
like
if
you
want
you
use
JSON
document.
If
you
want
complicated
handling
like
for
you
know,
objects
and
arrays
yeah,
that's
what
I'm
saying
you
don't
use
that
that
would
be,
but
we'd
show
an
example
of
that
as
part
of
our
stuff.
We
even
use
it
internally,
right
so
to
say:
hey
look!
Here's
one
of
the
here's
one
of
the
concrete
examples
of
writing
a
converter.
E
D
Okay,
so
I
want
to
bring
I
wanna,
I
I
know
we
wanted
to
move
on
from
this,
but
I
want
to
bring
this
back
up
because
I
guess
I
was
I
was
wrong
about
this
detail
and
now
I'm
kind
of
unsettled
by
it.
The
fact
that
writing
a
converter,
that's
really
naive
and
calling
like
Rita
string,
is
going
to
result
in
invalid
operation,
exception
and
result
in
result
in
an
invalid
operation,
exception
bubbling
all
the
way
up
the
stack.
G
D
It
does
kind
of
break
the
air
handling
model
that
we
talked
about
before,
where,
as
Levi
said,
if
you
try
to
reduce
some
of
these
converter
samples
to
like
the
most
simple
form
like,
let's
simplify
this
code,
like
a
user
who
doesn't
know
these
API
as
well
and
was
trying
to
just
write
like
the
simplest
thing
that
completes
the
job
or
like
the
shortest
thing
that
completes
the
job.
It's
going
to
result
in
error
handling
not
working
correctly
well,
so
I
am
concerned
about
that
and
I'm
interested.
I
C
I
usually
mean
the
bug
and
he's
gonna
read
for
taupe-y
time
construing
and
it
responds.
But
let's
see
the
user
did
not
know
about
that.
Then
do
it
and
just
cause
the
reader
got
their
string
and
they
rely
on
the
fact
that
it
gets
to
guessing.
We
throw
we
throw
and
we
are
measuring
in
an
operation
exception
and
now
that
catch
is
not
being
caught
by
the
sea
Eliezer
and
just
be
provided
to
user.
C
H
A
A
Does
but
thank
you,
but
now,
but
I
think
I
think
the
problem
that
we
have
is
that,
like
the
general
and
pattern
is
you
have
basically
an
outer
loop
that
has
to
get
data
yeah
and
you
want
an
outer
loop
to
basically
reliably
handle
between
the
actual
buffers
and
the
code
in
between
may
not
be
user
code,
but
that's
kind
of
the
scenario
that
we
have.
That
seems
like
a
general
pattern
that
is
not
just
applicable
here.
C
J
C
J
C
I
D
D
Then
you
get
implicit
error
handling
like
if,
if
reader
don't
get
string
throws
JSON
exception
and
I'm
not
saying
that
implicit
is
necessarily
better
I'm
saying
that
we
have
to
make
a
decision
here
between
explicit
and
implicit,
and
if
the
decision
is
for
explicit
error
handling,
then
making
these
things
be.
Try
read
and
returning
false
seems
better
well,
I
would
versus
Jim
posted
error
handling.
It
seems
worse
so.
A
I
would
generally
agree
with
you
I.
Think,
though,
like
the
the
thing,
if
you
think
about
what
you
what
we
just
talked
about
right,
it
seems
reasonable
to
me
to
say
if,
if
the
model,
as
you
go
away
from
try
B,
we
just
go
to
read
and
I
think
it's
reasonable
to
say
that
straightforward
coded
user
would
write.
A
A
Yes,
honestly,
that
idea,
which
which,
but
that
doesn't
prevent
somebody
else
to
be
explicit,
error
handling.
It
just
means
the
only
thing
we
change
is
the
exception
type
that
is
being
thrown
right
yeah.
It
just
means
that
if
somebody
wants
to
avoid
the
exception,
they
can
do
the
Tocco
type
check
up
front
or
call
some
other
API,
but
it
doesn't
change
the
fact
that
we
did
not
get
string
if
you're
not
standing
on
the
string.
A
Is
it's
an
invalid
operation
of
your
world,
but
I
would
say
that
invalid
operation
is
not
really
meant
to
be
caught.
We
are
for
call
sex
up,
because
at
that
point
you
wanna
know
what
the
operation
was.
I
think
that's
the
kind
of
thing
where
okay,
the
immediate
handler
needs
to
handle
it
or
you
die,
and
in
this
case
we
don't
want
to
die.
I
think.
J
What's
going
to
happen,
is
we're
going
to
end
up
with
a
lot
of
NuGet
packages
where
the
contents
of
the
prior
read
method
is
going
to
be
a
try?
Implementation
catch
bro
Jason
exception,
because
people
are
going
to
want
to
debug
it
and
they're
going
to
want
to
catch
a
single
exception,
type
and
they're
not
going
to
want
to
have
to
be
like?
Oh
I
have
to
go
and
handle
all
these
cases
by
writing.
500
extra
lines
of
boilerplate
code
checking
every
type
and
handling
comments
and
everything.
I
A
A
A
Exactly
which,
but
you
bet
you're
saying
then
the
same
thing
that
I
have
said
like
it
just
needs
a
different
exception
time,
because
basically
we
don't
want
the
get
string
case
to
cause
the
same
kind
of
error
as
oh,
you
divide
it
by
zero
or
whatever
else
you
did
in
your
code,
but,
like
anything,
where's
it
back
in
your
code,
you
should
just
die.
Everything
else
should
be
handled
for
you,
but.
A
Why
would
that
be
different?
Basically,
what
I
would
expect
is
that
there's
one
loop
there.
Basically
you
you
handle
two
kinds
of
exceptions.
Right,
one
of
them
is
I'm
out
of
data,
so
get
more
data.
The
other
one
is
the
gelatinization.
Exception
happens,
in
which
case
you
return
400
and
then
anything
else
is
a
500.
You
just
do
you
just
say
yeah,
because.
I
C
I
Even
that
that
was
a
question
I
asked
earlier
about.
Does
a
converter
need
to
know
about
all
these
different
configuration
switches
that
the
reader
might
be
operating
in?
The
only
one
that
came
to
mind
was
comments
because
stuff,
like
allowed
trailing
commas,
is
just
dropped.
Anybody
when
they
obsessed,
so
you
don't
have
to
special
show
him
in
the
room,
but
them
because
if
you
look
at
the
samples
here,
like
the
the
read
array
sample
like
there
was
no
case
token
tight
comma,
it
was
just
number
read:
go
to
the
next
one.
B
A
D
A
C
H
If
you,
if
you
read
more
than
one
value,
which
is
a
bug
in
the
in
your
converter,
because
you
should
only
read
one
value
yeah,
if
you're
given
a
start,
object,
you're
guaranteed,
you
can
get
to
the
end
object.
If
you're,
given
a
start
array,
you're
guaranteed
you'll,
get
to
the
end
of
the
array
and
I
can
give
in
the
strangers
guaranteed
the
whole
thing
there.
There.
G
H
C
C
A
It
also
depends
on
what
you
do.
Why
there's
only
three
options,
but
either
you
make
sure
you
don't
run
out
of
data
when
you
call
the
guy.
The
second
thing
is
you
throw
an
exception
and
then
provide
more
data
and
then
call
read
again:
write
more
you're,
basically
forcing
everybody
to
do
the
try,
read
pattern
which
I
think
you
can
achieve
and
will
not
work
so
see
that
the
exception
one
enjoyed
reading
ahead
before
she,
oh
okay,.
G
Sorry,
we
talked
one
of
the
explicit
goals
we
had
up
front
was
performance
and,
as
part
of
that
goal,
we
explicitly
said
we
will
sacrifice
usability
I,
don't
remember
the
exact
term,
it
might
have
not
been
bought.
Unquote,
usability
right,
general
feeling
was
that
performance
was
paramount
to
usability
and
now
we're
saying
that
it's
not
in
this
case.
What.
A
I'm
trying
to
say
is
that
what
else
would
you
do
because
I
think
there's
only
two
other
options?
One
option
is
you
basically
say
everybody
has
to
do
a
try,
read
and
then
we
turn
the
error
code,
in
which
case
you
also
do
a
double
read.
If
you
run
out
of
data,
is
you
have
to
potentially
unwind
a
few
of
those.
G
G
If
you
got
a
buffer
that
just
Android
in
the
middle
I
mean
somebody
passed
you
a
string
as
a
buffer
and
half
the
JSON
was
gone
for
whatever
reason,
because
it's
malformed,
you
will
run
out
of
data
in
that
case,
but
then
your
your
malformed
in
that
case,
but
but
it
still
requires
the
exact
same
check
to
say
reader,
get
string
our
story
on
reader
read.
Did
you
return
false?
That
means
you
don't
have
any
more
data
that
can
still
happen
in
an
on
screen
case
yeah.
We
can't
get
more.
D
E
G
But
it's
gonna
also
throw
what
does
that
throw
a
meter.
Reader
re
I
mean
just
returns,
false
right.
G
C
Yes,
I
need
an
exception.
So
that's
what
I'm
saying
like
an
extreme
case
where
you
don't
have
you
can't
have
partial
data,
you
have
this
capability
to
retry
and
get
more
data,
which
is
why
we
don't
throw
find
the
Pyrenean
strain
case
it'll.
No,
it's
more
input.
Sync!
So
you
pass.
It
is
pal
doc.
True
and
if
you
happen
to
have
no
enough
data,
the
reader
will
throw
for
you.
C
G
C
H
We
just
be
in
the
case
where
the
reader,
where
is
final,
is
false.
Then
the
serializer
should
just
call
skip,
and
do
that
like
to
use
the
fact
that
it's
a
value
type
that
it
can
make
copied
easily
yeah
it
skipped
throws.
Then
it
throws
there
wasn't
enough
data,
you
couldn't
do
it
and
if
it
doesn't
throws
and
everyone's
guaranteed
to
successfully
complete
their
object.
Yes,.
C
Skip
and
rewind
I
mean
see
you
passed
me
by
today.
There's
no
point,
we're
saying:
hey
you
renovate,
unless
ask
for
more,
but
we
want
more
I
was
saying.
If
you
cannot,
stream
is
what
is
the
other
one
call
binary
string?
That's
it!
Oh,
you
mean,
like
we
only
sequence,
yeah,
whatever
that's
not
a
little
bit
here,
because
it's
only
for
the
lower
level
eater
I
see
she
either
has
to
input
my
stream
binary
string.
C
G
That,
okay,
so
effectively,
we
don't
read
ahead,
I'm
proposing
we
don't
read
ahead,
except
for
the
stream
case,
because
there's
no
way
to
unwind
a
call
stack
and
reread
so
we
have
to
read
ahead
and
even
on
our
case,
we
don't
read
ahead.
If
we
get
to
that,
we
can
get
to
the.
G
G
An
optimization
for
that,
if,
if
you
run
out
of
data
in
the
spring
or
byte
array
case,
that
would
be
user
code
that
calls
read
or
read
or
some
framer
coder
before
you
know,
we
call
the
converter
here.
Yeah.
C
A
That's
the
same
as
you
expected
the
string
when
you
go
to
bool
or
you
expected
a
null
and
there's
no,
no,
but
that's
just
a
malformed
payload
and
it's
the
other
case
where
there
might
be
more
stuff.
So
somebody
has
to
advance
the
reader
I'll
be
basically
sore.
I,
basically
get
more
stuff
from
the
stream
right
and
the
next
game.
We
are
we
saying
that
in
the
stream
case,
it
will
be
transparent
that
this
guy
basically
will
never
have
the
exception
case.
Or
are
we
saying
you
user
code
has
to
handle
that
user.
C
C
H
H
So,
if
they're
reading
a
complex
object
when
they
call
move
to
get
to
the
next
part
of
it,
that
could
throw
the
I
ran
out
of
data,
but
that
call
to
move
would
have
thrown
and
it
would
have
thrown
the
Jason
exception.
It
string
only
return,
it
returns
a
string
or
throws
invalid
operation,
and
that's
it
yeah.
That's.
A
C
H
Serializer
catches,
both
invalid
operation
and
Jayson
exception,
but
not
any
other
exception
type,
and
we
just
document
that
it
does
those
two
things
and
everything
else
is:
you
know
null
refs
arguments,
exceptions,
io
exceptions.
All
of
those
are.
This
is
not
done
by
this
platform
itself.
It
is
clearly
your
user
code,
we're
not
catching
it
we'll
catch
the
occasional
invalid
operation
exception
that
was
really
in
the
user
code
and
we'll
wrap
them
at
the
Jason's
malformed.
But
it
wasn't
gonna
work
anyway,
so
it's
better
to
be
slightly
wrong.
In
that
case,.
G
H
Okay,
the
the
guideline
is
like
we
have
exception
types
and
you
should
use
them
and
not
reinvent
them
right.
So
the
only
reason
we
would
want
a
Jayson
and
valid
operation
exception,
so
the
serializer
can
catch
it
as
distinct
from
the
user,
calling
any
other
method
themselves.
That's
really
against
our
exception
guidelines,
that
is
a
reader
readers
exception.
I
H
E
A
Would
be
deriving
from
invalid
operation
exception
right
can
even
that
donkey
can
just
catch
you
by
looking
at
interception
and
people
that
don't
they
do
care
can
differentiate
them.
Let's
what
we
do
in
other
places
with
like
operation
cancered
exception
that
we
have
asked
operation
canceled
exception
and
the
general
operation
canceled
exception,.
J
Also
have
a
note,
because
the
invalid
operation
exception
can
be
thrown
in
a
wide
variety
of
circumstances.
It
is
important
to
read
the
exception
message
returned
by
the
message:
property.
Basically,
we
throw
this
from
too
many
places
for
it
to
actually
be
useful
for
differentiation,
so
you
have
to
eat
you
string
looking
to
be
me.
Meaningful
I
mean.
A
E
G
H
A
L
C
J
A
Of
our
library,
which
case
either
make
it
internal,
which
is
effectively
a
way
to
say
the
only
person
that
can
drive
from
the
disaster
or
you
make
it
private
protected,
which
basically
means
it's
protected
and
internally,
which
means
it
just
means
within
our
own
Cobras,
a
slightly
more
restrictive
than
internal,
but
like
practically
speaking
its
internal
from
the
outside.
Okay.
C
C
D
So
my
concerns
were
around
how
they
get
registered
and
how
they
look
like
on
options
so
for
for
Jason
we
can.
We
can
move
on
to
the
next,
so
good,
Jason
convertor,
binder
in
this
case,
is
really
kind
of
acting
as
I
understand.
It's
really
kind
of
acting
as
a
factory
or
finders
right
or
for
converters.
G
B
J
A
D
D
If
we
make
a
custom
collection
type,
that's
derived
from
collection
of
Jason
converter,
then
you
just
add
a
method
like
call
this
call
this
collection,
like
binders
or
converter
binders,
and
instead
of
being
of
type
Jason
converter,
it's
of
type
Jason,
converter,
binder
and
then
just
add
a
method
as
an
accelerator
to
register
converter
of
T
and
associated
as
the
binder
for
that
T.
What.
G
D
Why
you
have
the
accelerator
so,
like
you
add
a
so,
the
collection
is
a
collection
of
its
I
collection
or
I
list
or
it's
you
know
it's
a
derived
class
right.
It's
derived
from
collection
T,
but
you
add
a
method
like
so
it's
like
imagine
that
it
says:
Jason,
binder,
collection,
binders
and
you've
had
a
method
like
register,
converter
or
ad
converter.
That
takes
a
JSON
converter
of
T
instance
and
then
behind
the
scenes
that
creates
a
binder
for
you
that
operates
on
that
T.
D
C
J
C
J
C
G
Because
I
also
said
that
this
list
that
we
have
that
Ryan
was
just
talking
about
it-
contains
a
base
class
of
Jason
converter,
which
is
these
are
gonna,
be
a
binder
or
the
real
Jason
converter
of
T.
The
user
doesn't
care
when
they're
adding
these.
They
don't
distinguish
because
they
look
the
same.
They
don't
see
generics
in
the
type
or
anything
like
that
and
we
need
a
single
list.
So
order
can
be
changed
and
our
my
personal
list
of
none
but.
C
K
G
C
C
C
J
Okay,
okay,
I,
see
and
I
was
saying,
I
think
that's
confusing
to
have
a
binder,
which
is
also
a
converter,
which
does
no
conversion
itself
and
has
the
type
of
check.
Even
though
the
get
converter
method
returns
null
of
the
types
not
supported
so
you're
like
duplicating
logic,
and
it's
not
clear
how
that
should
be
implemented
or
anything
right.
C
D
J
D
Yeah
and
it
would
call
it
we
call
can't
convert
and
if
can't
convert
return
true,
it
would
return
that
instance,
so
it
sort
of
wraps
it
up.
The
naming
becomes
a
little
bit
less
clear
yeah,
because
you
would
look
at
that
property
and
you
would
say
I
want
to
find
converters
and
then
there
isn't
something
called
converters.
That's
the
one
part
of
this
plan
that
I
don't
like,
which
maybe
we
can
fix
yeah,
but
it
seems
like
we
could
provide
both
of
these
scenarios
really
easily
without
doing
your
things
with
a
type
hierarchy.
D
We
remove
the
inheritance
of
JSON
converter
binder
from
Jason
converter,
so
Jason
converter
binder
no
longer
inherits
from
kasnia
murder.
We
removed
that.
Then
we
go
up
to
Jason
serializer
settings
and
instead
of
a
list
of
JSON
converter,
we
have
a
custom
collection
that
derives
from
collection
of
JSON
converter
binder.
So,
instead
of
what's
there
currently,
you
have
Jason
converter
binder
collection
binders
as
a
as
a
public
property,
then
on
the
implementation
of
JSON
converter,
binder
collection,
you
add
a
method
like
call
an
ad
converter
or
register
converter
or
whatever
you
want.
D
That
accepts
a
that
accepts
a
jason
converter
instance,
and
so
that
method
then
adds
to
the
collection
for
you
a
like
default
implementation
of
JSON
converter
binder.
That
does
does
like
the
default
thing
calls
can
convert
on
the
jason
converter
and
if
it
succeeds,
returns
that
converter.
So
you
basically
for
the
simple
case
you
get
a
binder
for
free
and
it
supports
both
cases,
but
the
collection
and
registration
metric
method
is
actually
binder.
Centric
global
with
the
collection,
initializers.
J
G
I
mean
if
we
want
to
treat
that
as
a
first
class
scenario,
then
yeah,
but
in
the
end
you
of
it,
you
end
up
just
creating
the
same
number
of
converters.
You
just
have
one
binder.
G
J
A
D
A
Yeah
look
so
I
would
suggest
we
take
that
often
I
will
copy
and
paste
the
notes
in,
and
then
we
maybe
do
another
round
next
week.
If
we,
if
you
feel
you
have
enough
time
to
come
up
with
a
design
like
my
the
problem,
is
we
need.
We
have
like
I,
don't
know
a
gazillion,
more
inaudible
reviews
that
I
have
to
like
fill
in
at
some
point
so
going
to
be
challenging
to
get
everything
done.