Fixes #40 Add helper method to serialize Entity into Json