<!DOCTYPE html><html><head><metacharset="utf-8"><title>RequireJS JSON plugin</title><metaname="viewport"content="width=device-width, initial-scale=1"></head><body><divid="wrapper"><h1>RequireJS JSON plugin</h1><p>Helper for loading JSON files, it will also work during optimization (wrapping JSON files into a `define` call).</p><p>If you want to load JSONP data use the `async` plugin instead.</p><p>You can set the flag <code>`!bust`</code> to prevent caching the JSON response, it will append a query argument <code>"bust=RANDOM_INTEGER"</code> to the URI.</p><h2>Output:</h2><divid="output"style="border:1px solid #ccc; background:#f5f5f5; padding:10px 20px"></div></div><script src="../lib/require.js"></script><script>require.config({waitSeconds:2,paths:{text:'../lib/text',//text is requiredjson:'../src/json'//alias to plugin}});// adding the flag `!bust` to the end of dependency name will avoid cachingrequire(['json!data/foo.json','json!data/bar.json!bust'],function(foo,bar){varout=document.getElementById('output');//data is parsed into an objectout.innerHTML+='<p><b>lorem:<\/b> '+foo.lorem+'<\/p>';out.innerHTML+='<p><b>bar:<\/b> '+foo.bar+'<\/p>';out.innerHTML+='<p><b>message:<\/b> '+bar.text+'<\/p>';});</script></body></html>