Change read json from file to from inputstream