diff options
author | Alex Tatiyants <atatiyan@gmail.com> | 2016-01-29 21:33:19 -0800 |
---|---|---|
committer | Alex Tatiyants <atatiyan@gmail.com> | 2016-01-29 21:33:22 -0800 |
commit | 781479ea7f793c8d075caee53f6413a1d2e85307 (patch) | |
tree | 9918fcbafa92b7de12dc43f2f5740b8a53bab017 /app/services/plan-service.ts | |
parent | 7e0665204c5931a8fa47d835a4799030a960c354 (diff) |
add plan validation
Diffstat (limited to 'app/services/plan-service.ts')
-rw-r--r-- | app/services/plan-service.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/services/plan-service.ts b/app/services/plan-service.ts index a32001b..e634f64 100644 --- a/app/services/plan-service.ts +++ b/app/services/plan-service.ts @@ -73,6 +73,15 @@ export class PlanService { return plan; } + isJsonString(str) { + try { + JSON.parse(str); + } catch (e) { + return false; + } + return true; + } + analyzePlan(plan: IPlan) { this.processNode(plan.content.Plan); plan.content[this.MAXIMUM_ROWS_PROP] = this._maxRows; |