[add] adding json write function
[add] content-length