Java: JSON to Map
We can construct a Map<String, Object>
from a JSON string with the help of reflect:
1 | import com.google.gson.Gson; |
We can construct a Map<String, Object>
from a JSON string with the help of reflect:
1 | import com.google.gson.Gson; |
Algorithm Puzzles everyday every week sometimes: Edit Distance
Algorithm Puzzles everyday every week sometimes: Koko Eating Bananas
Algorithm Puzzles everyday every week sometimes: Rotate Image
Algorithm Puzzles everyday every week sometimes: Subtree of Another Tree
Algorithm Puzzles everyday every week sometimes: Best Time to Buy and Sell Stock
Algorithm Puzzles everyday every week sometimes: Algorithm Puzzles: Swap Nodes in Pairs
Algorithm Puzzles everyday every week sometimes: Unique Paths
1 | logging.basicConfig(level=logging.INFO) |
But this will not log to Cloud Watch when test on the cloud.
AWS Lambda Python runtime has pre-configured log handlers. To log to Cloud Watch:
1 | logger = logging.getLogger() |
But this will not log to local Python interpreter when test locally.
1 | # If there is no pre-configured log handler, we set basicConfig |