Skip to content

Tag: java

How to deserialize json to nested custom map via gson?

I have the following json To deserialize it, I have the following data model class. I am not getting any deserialization error when I am using gson but the profiles variable is coming as null. This is how I am deserializing. var json = gson.fromJson(data,json.class) inside the match object there can be a dyna…

Header sent from Java changes it name on PHP side

I am sending X-Auth-HMAC header from Java using HttpClient to Nginx + PHP-FPM combo: But on PHP side in $_SERVER variable among all headers i get: How could X-Auth-HMAC become HTTP_X_AUTH_HMAC ? Answer PHP formats HTTP headers in the $_SERVER variable according to RFC 3875 (the CGI 1.1 spec). Specifically sec…