Adding json rules to assist in generation code

used separtely from library