private void writeExecutionStrategy(ExecutionStrategy strategy) { owt.Write("{"); if (strategy != null && !strategy.IsEmpty()) { owt.Write("\"rules\":["); int i = 1; foreach (Rule rule in strategy.Rules) { writeRule(rule); if (i++ < strategy.Rules.Count) { owt.Write(", "); } } owt.Write("]"); owt.Write(", \"operator\":"); writeStrategyOperator(strategy.Operator); if (strategy.Next != null) { owt.Write(", \"next\":"); writeExecutionStrategy(strategy.Next); } } owt.Write("}"); }