Move articles json generation to its own function