Intelligently find the required json libraries instead of hardcoding the flags
Intelligently find the required json libraries instead of hardcoding the flags