skip to Main Content

Json Deserialization of string "2023-11-10 23:01:18.940" to calendar

I am trying to deserialize json String date to Calendar and deserialization is working however it is not what i want. Current Behaviour @JsonProperty("systemDt") @JsonFormat(Pattern="yyyy-MM-dd HH:mm:ss.SSS") Calendar responseDateTime; Deserializes to responseDateTime=java.util.GregorianCalendar[time=1141556400000,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="UTC"...... I want a Simple Calendar Date of the format…

VIEW QUESTION

Nested JSON blob in Snowflake

I'm trying to query on the following JSON Blobs in MyTable that is varchar, however, JSONBlob2 has square brackets over the curly brackets that seem to be interfering with my query: MyTable JSONBlob JSONBlob2 {"a": "12345", "b": {"c":"567", "d":"llc"} }…

VIEW QUESTION

Extract value from JSON array using Snowflake sql

Snowflake table has a varchar column with following JSON array as value. [{"$":6394.2,"@":"decisionMetricValue","@id":"Month 1"},{"$":6672.25,"@":"decisionMetricValue","@id":"Month 2"},{"$":5643.05,"@":"decisionMetricValue","@id":"Month 3"},{"$":5564.79,"@":"decisionMetricValue","@id":"Month 4"},{"$":6966.75,"@":"decisionMetricValue","@id":"Month 5"},{"$":7605.15,"@":"decisionMetricValue","@id":"Month 6"}] Using snowflake sql, I would like to extract data in following format. Month1,Month2,Month3,Month4,Month5,Month6 6394.2,6672.25,5643.05,5564.79,6966.75,7605.15 I was trying to implement solution https://stackoverflow.com/a/77319223/20535715…

VIEW QUESTION

slf4j and log4j2 json messages escaped

I'm using slf4j and log4j2 as the implementation. I wanted my messages (in JSON) to be logged as JSON and not escaped as Strings. Looking at the org.apache.logging.log4j.layout.template.json.resolver.MessageResolver class, I see that it should work if I remove the stringified…

VIEW QUESTION
Back To Top
Search