Dev json xff v0.3

New version based on previous PR #1102.