building circle and person relation graph and return it as json