<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -93,7 +93,15 @@ local function buildDecoder(mode)
 	end
 end
 
-local strictDecoder, defaultDecoder = buildDecoder(strict), buildDecoder(default)
+-- Since 'default' is nil, we cannot take map it
+local defaultDecoder = buildDecoder(default)
+local prebuilt_decoders = {}
+for _, mode in pairs(modes_defined) do
+	if _M[mode] ~= nil then
+		prebuilt_decoders[_M[mode]] = buildDecoder(_M[mode])
+	end
+end
+
 --[[
 Options:
 	number =&gt; number decode options
@@ -105,10 +113,9 @@ Options:
 ]]
 function getDecoder(mode)
 	mode = mode == true and strict or mode or default
-	if mode == strict and strictDecoder then
-		return strictDecoder
-	elseif mode == default and defaultDecoder then
-		return defaultDecoder
+	local decoder = mode == nil and defaultDecoder or prebuilt_decoders[mode]
+	if decoder then
+		return decoder
 	end
 	return buildDecoder(mode)
 end</diff>
      <filename>lua/json/decode.lua</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9e94cc631c96f8f15a73b7e5f36024b61b38878b</id>
    </parent>
  </parents>
  <author>
    <name>Thomas Harning Jr</name>
    <email>harningt@gmail.com</email>
  </author>
  <url>http://github.com/harningt/luajson/commit/d86427b050ed39473df8f3adf15fdd222b326fc6</url>
  <id>d86427b050ed39473df8f3adf15fdd222b326fc6</id>
  <committed-date>2009-06-23T21:56:57-07:00</committed-date>
  <authored-date>2009-06-23T21:56:57-07:00</authored-date>
  <message>decoder: adds support for caching new arbitrary configs</message>
  <tree>481576b84d0581de9f3cf5b15666454e673dec3d</tree>
  <committer>
    <name>Thomas Harning Jr</name>
    <email>harningt@gmail.com</email>
  </committer>
</commit>
