Some useful code I reuse anytome I have to handle some json