spm gives correct json in output always