Depositions may be taken to be read on the trial, in the same manner and under the same circumstances as in cases before justices of the peace.