add truncate method
add fromJsonOrDie method