diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2020-02-03 12:22:59 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-02-03 12:22:59 +0000 |
commit | 8d1bac4f46bde92d76468a9e89a9a4fc52562663 (patch) | |
tree | 7ba950c7d755285aa18f41029bc44f0f6eec49b8 /utils/src/main/java/org/onap/policy/common/utils/coder/StandardYamlCoder.java | |
parent | 658471f126a11954b20249cbd9b0ecd97f14091e (diff) | |
parent | 4f909d754b638ab4563eb9466836cc2d7a184d63 (diff) |
Merge "Add pretty() method to Coder"
Diffstat (limited to 'utils/src/main/java/org/onap/policy/common/utils/coder/StandardYamlCoder.java')
-rw-r--r-- | utils/src/main/java/org/onap/policy/common/utils/coder/StandardYamlCoder.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/utils/src/main/java/org/onap/policy/common/utils/coder/StandardYamlCoder.java b/utils/src/main/java/org/onap/policy/common/utils/coder/StandardYamlCoder.java index 36f15b96..1bcf6ac0 100644 --- a/utils/src/main/java/org/onap/policy/common/utils/coder/StandardYamlCoder.java +++ b/utils/src/main/java/org/onap/policy/common/utils/coder/StandardYamlCoder.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,6 +38,12 @@ public class StandardYamlCoder extends StandardCoder { } @Override + protected String toPrettyJson(Object object) { + // YAML is already "pretty" + return toJson(object); + } + + @Override protected String toJson(Object object) { return translator.toYaml(object); } |