JSON file embedded content to lock placeholders

Hi,

 

I have received a JSON file with segments that contain many placeholders/variable within.

An example,

"description": "Out of {{totalReq}} {{'requirement' | devEntityDescription : true}}, <span ng-class=\"{'p-rdx--link-cursor' : {{count}}>0}\" ng-click=\"cqRiskIndicatorNav({{count}}>0 ? 'cqMaintainabilityRiskIndicator' : '')\">{{count}} {{'requirement' | devEntityDescription : true}} with {{riskStatus}} Priority {{category}} issues</span>",

"zeroIssuesDesc": "Out of {{totalReq}} {{'requirement' | devEntityDescription : true}}, 0 {{category}} known issues found"

 

Can I work with the embedded content, or other feature, to lock these placeholders/variables using reg ex?

 

Please advise ASAP

 

BR

Fouad

Parents Reply
  • What I'm trying to say is that the effort is probably not worth the questionnable result.
    The Studio built-in JSON parser won't allow you to parse BOTH the {{blabla}} placeholders AND the HTML code - if I see correctly, you can parse either one or the other, but no both. And the Supertext JSON parser uses only regex-based embedded content parser, which might not be easy/simple to configure for parsing both the placehodlers and the HTML code. It depends in how complex the embedded HTML gets...

    BTW, maybe it's just me, but looking at the examples I'm not quite clear whether the word "requirement" is meant to be a non-localizable variable name, or a localizable word...
    It's so difficult to get "what the heck is the sentence supposed to say" that I simply don't know... The programmer who created this must be really smoking a very good stuff... :-\
Children