Added an example solution for json compatibility in main part.