[Geoserver-users] JSON output including key = null values option?

Dear Geoserver users/developers.
We are using the Geoserver JSON output for data interchange. I was wondering whether it is possible to configure geoserver in a manner that would enable the outputting of ALL the keys received from the schema. The current behaviour we are observing is the ( more common) JSON behaviour that null values are dropped. We are reconstructing FeatureCollections from the JSONs and missing keys ( reflecting null values in the DB) are causing us problems.

What I am after is the exposure of the Geotools FeatureJSON parameter ( I assume that this is the lib used for serialising to JSON) http://docs.geotools.org/stable/javadocs/org/geotools/geojson/feature/FeatureJSON.html#isEncodeNullValues%28%29
isEncodeNulllValues to true….

Is this possible/exposable in the next release/

Thanks
Martin

On Tue, Nov 5, 2013 at 12:59 PM, Martin Tomko <tomkom@anonymised.com> wrote:

Dear Geoserver users/developers.
We are using the Geoserver JSON output for data interchange. I was
wondering whether it is possible to configure geoserver in a manner that
would enable the outputting of ALL the keys received from the schema. The
current behaviour we are observing is the ( more common) JSON behaviour
that null values are dropped. We are reconstructing FeatureCollections from
the JSONs and missing keys ( reflecting null values in the DB) are causing
us problems.

Yes, either a format_option could be exposed to control that (
http://docs.geoserver.org/latest/en/user/services/wfs/vendor.html#format-options),
or a server side setting.

What I am after is the exposure of the Geotools FeatureJSON parameter (
I assume that this is the lib used for serialising to JSON)
http://docs.geotools.org/stable/javadocs/org/geotools/geojson/feature/FeatureJSON.html#isEncodeNullValues()
isEncodeNulllValues to true….

Is this possible/exposable in the next release/

Even if you gave us a patch today with the changes and a test that proves
it's working, it would be impossible
to have it by the next release, as new features have to stay a month in the
development branch, and then need
a positive vote from the PSC to be backported.

So the full drill is, discuss the new option on geoserver-devel (checking
for feebdack), code the
change, make a pull request for master, then after a month ask for a vote
to backport.
Or find someone to do this on your behalf.

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Thanks Andrea,
Our team is developing and patching geotools, I don’t think we have tried Geoserver yet – will se how much is involved to get this done.

Thanks,
M.

···

Dear Geoserver users/developers.
We are using the Geoserver JSON output for data interchange. I was wondering whether it is possible to configure geoserver in a manner that would enable the outputting of ALL the keys received from the schema. The current behaviour we are observing is the ( more common) JSON behaviour that null values are dropped. We are reconstructing FeatureCollections from the JSONs and missing keys ( reflecting null values in the DB) are causing us problems.

Yes, either a format_option could be exposed to control that (http://docs.geoserver.org/latest/en/user/services/wfs/vendor.html#format-options), or a server side setting.

What I am after is the exposure of the Geotools FeatureJSON parameter ( I assume that this is the lib used for serialising to JSON) http://docs.geotools.org/stable/javadocs/org/geotools/geojson/feature/FeatureJSON.html#isEncodeNullValues%28%29
isEncodeNulllValues to true….

Is this possible/exposable in the next release/

Even if you gave us a patch today with the changes and a test that proves it’s working, it would be impossible
to have it by the next release, as new features have to stay a month in the development branch, and then need
a positive vote from the PSC to be backported.

So the full drill is, discuss the new option on geoserver-devel (checking for feebdack), code the
change, make a pull request for master, then after a month ask for a vote to backport.
Or find someone to do this on your behalf.

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


On Tue, Nov 5, 2013 at 1:13 PM, Martin Tomko <tomkom@anonymised.com> wrote:

Thanks Andrea,
Our team is developing and patching geotools, I don’t think we have tried
Geoserver yet – will se how much is involved to get this done.

Nice. Remember, it's always best to discuss the changes you want to make
first on the devel list, and code later,
than to code first, and then get asked to make modifications when you try
to contribute the code

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------