summaryrefslogtreecommitdiff
path: root/source/compiler-core/slang-artifact-desc-util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler-core/slang-artifact-desc-util.cpp')
-rw-r--r--source/compiler-core/slang-artifact-desc-util.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/source/compiler-core/slang-artifact-desc-util.cpp b/source/compiler-core/slang-artifact-desc-util.cpp
index 08b7c8412..ca7dcb70f 100644
--- a/source/compiler-core/slang-artifact-desc-util.cpp
+++ b/source/compiler-core/slang-artifact-desc-util.cpp
@@ -710,6 +710,26 @@ SlangResult ArtifactDescUtil::appendDefaultExtension(const ArtifactDesc& desc, S
// Don't know the extension for that
return SLANG_E_NOT_FOUND;
}
+ case ArtifactKind::Json:
+ {
+ auto ext = _getPayloadExtension(desc.payload);
+ if (ext.begin() != nullptr)
+ {
+ // TODO(JS):
+ // Do we need to alter the extension or the name if it's an
+ // obfuscated map?
+ //if (isDerivedFrom(desc.style, ArtifactStyle::Obfuscated))
+ //{
+ //}
+
+ out << ext;
+ return SLANG_OK;
+ }
+
+ // Not really what kind of json, so just use 'generic' json extension
+ out << "json";
+ return SLANG_OK;
+ }
default: break;
}