Class FormatJsonHelper
java.lang.Object
com.github.tomakehurst.wiremock.extension.responsetemplating.helpers.HandlebarsHelper<Object>
com.github.tomakehurst.wiremock.extension.responsetemplating.helpers.AbstractFormattingHelper
com.github.tomakehurst.wiremock.extension.responsetemplating.helpers.FormatJsonHelper
- All Implemented Interfaces:
com.github.jknack.handlebars.Helper<Object>
Handlebars helper to allow JSON to be formatted:
```handlebars {{#formatJson format='pretty'}} // Badly formatted JSON {{/formatJson}}``` `format` can be `pretty` or `compact` and defaults to `pretty`
-
Nested Class Summary
Nested classes/interfaces inherited from class com.github.tomakehurst.wiremock.extension.responsetemplating.helpers.AbstractFormattingHelper
AbstractFormattingHelper.Format -
Field Summary
Fields inherited from class com.github.tomakehurst.wiremock.extension.responsetemplating.helpers.HandlebarsHelper
ERROR_PREFIX, ERROR_SUFFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringapply(String bodyText, AbstractFormattingHelper.Format format) Methods inherited from class com.github.tomakehurst.wiremock.extension.responsetemplating.helpers.AbstractFormattingHelper
applyMethods inherited from class com.github.tomakehurst.wiremock.extension.responsetemplating.helpers.HandlebarsHelper
getRequestCache, handleError, handleError, handleError
-
Constructor Details
-
FormatJsonHelper
public FormatJsonHelper()
-
-
Method Details
-
apply
- Specified by:
applyin classAbstractFormattingHelper
-