public void ExecutePrintyPrint(JsonPPStrategyContext context) { if (context.IsProcessingString) { context.AppendCurrentChar(); } }
public void ExecutePrintyPrint(JsonPPStrategyContext context) { if (context.IsProcessingString) { context.AppendCurrentChar(); return; } PeformNonStringPrint(context); }
public void ExecutePrintyPrint(JsonPPStrategyContext context) { context.AppendCurrentChar(); if (context.IsProcessingString) return; context.EnterArrayScope(); context.BuildContextIndents(); }
public void ExecutePrintyPrint(JsonPPStrategyContext context) { context.AppendCurrentChar(); if (context.IsProcessingString) return; context.BuildContextIndents(); context.IsProcessingVariableAssignment = false; }
public void ExecutePrintyPrint(JsonPPStrategyContext context) { if (!context.IsProcessingDoubleQuoteInitiatedString && !context.WasLastCharacterABackSlash) { context.IsProcessingSingleQuoteInitiatedString = !context.IsProcessingSingleQuoteInitiatedString; } context.AppendCurrentChar(); }
public void ExecutePrintyPrint(JsonPPStrategyContext context) { if (context.IsProcessingString) { context.AppendCurrentChar(); return; } context.CloseCurrentScope(); context.BuildContextIndents(); context.AppendCurrentChar(); }
public void ExecutePrintyPrint(JsonPPStrategyContext context) { if (context.IsProcessingString) { context.AppendCurrentChar(); return; } context.IsProcessingVariableAssignment = true; context.AppendCurrentChar(); context.AppendSpace(); }
public void ExecutePrintyPrint(JsonPPStrategyContext context) { context.AppendCurrentChar(); if (context.IsProcessingString) { return; } context.BuildContextIndents(); context.IsProcessingVariableAssignment = false; }
public void ExecutePrintyPrint(JsonPPStrategyContext context) { if (context.IsProcessingString) { context.AppendCurrentChar(); return; } context.AppendCurrentChar(); context.EnterObjectScope(); if (!IsBeginningOfNewLineAndIndentionLevel(context)) return; context.BuildContextIndents(); }
public JsonPrettyPrinter(JsonPPStrategyContext context) { _context = context; _context.ClearStrategies(); _context.AddCharacterStrategy(new OpenBracketStrategy()); _context.AddCharacterStrategy(new CloseBracketStrategy()); _context.AddCharacterStrategy(new OpenSquareBracketStrategy()); _context.AddCharacterStrategy(new CloseSquareBracketStrategy()); _context.AddCharacterStrategy(new SingleQuoteStrategy()); _context.AddCharacterStrategy(new DoubleQuoteStrategy()); _context.AddCharacterStrategy(new CommaStrategy()); _context.AddCharacterStrategy(new ColonCharacterStrategy()); _context.AddCharacterStrategy(new SkipWhileNotInStringStrategy('\n')); _context.AddCharacterStrategy(new SkipWhileNotInStringStrategy('\r')); _context.AddCharacterStrategy(new SkipWhileNotInStringStrategy('\t')); _context.AddCharacterStrategy(new SkipWhileNotInStringStrategy(' ')); }
public void ExecutePrintyPrint(JsonPPStrategyContext context) { if (context.IsProcessingString) { context.AppendCurrentChar(); return; } context.AppendCurrentChar(); context.EnterObjectScope(); if (!IsBeginningOfNewLineAndIndentionLevel(context)) { return; } context.BuildContextIndents(); }
static void PeformNonStringPrint(JsonPPStrategyContext context) { context.CloseCurrentScope(); context.BuildContextIndents(); context.AppendCurrentChar(); }
private static bool IsBeginningOfNewLineAndIndentionLevel(JsonPPStrategyContext context) { return(context.IsProcessingVariableAssignment || (!context.IsStart && !context.IsInArrayScope)); }
public void ExecutePrintyPrint(JsonPPStrategyContext context) { if (!context.IsProcessingSingleQuoteInitiatedString && !context.WasLastCharacterABackSlash) context.IsProcessingDoubleQuoteInitiatedString = !context.IsProcessingDoubleQuoteInitiatedString; context.AppendCurrentChar(); }
private static void PeformNonStringPrint(JsonPPStrategyContext context) { context.CloseCurrentScope(); context.BuildContextIndents(); context.AppendCurrentChar(); }
public void ExecutePrintyPrint(JsonPPStrategyContext context) { context.AppendCurrentChar(); }
static bool IsBeginningOfNewLineAndIndentionLevel(JsonPPStrategyContext context) { return context.IsProcessingVariableAssignment || (!context.IsStart && !context.IsInArrayScope); }
public void ExecutePrintyPrint(JsonPPStrategyContext context) { if (context.IsProcessingString) context.AppendCurrentChar(); }