api.Client().ServiceGet() and int types
John Arbash Meinel
john at arbash-meinel.com
Mon Aug 26 17:32:24 UTC 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm implementing "juju get" via the API. In doing so, I moved over one
of our tests which did (pseudocode)
set value=int64(0)
DeepEquals(result, value)
And it used to work when ServiceGet was connecting directly to State.
Now that it goes via the API, the value is now a float64 (probably
because of JSON deserialization).
My guess is that the Mongo BSON type encodes int64 directly, but that
is lost when going via the JSON rpc.
So do we care? Are int types preserved in the rest of the system? I'm
guessing this will effect charms when they grab their settings.
However, can charms be strict about this today?
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlIbkSgACgkQJdeBCYSNAAN2AwCgi7+/oJtlywwAFqcNuW9NdcxM
y3IAoIvrVLruv0nmIcvjH1GjGvoxP+gg
=tQB9
-----END PGP SIGNATURE-----
More information about the Juju-dev
mailing list