1Dancer::Serializer::JSOUNsPe(r3)Contributed Perl DocumenDtaantcieorn::Serializer::JSONP(3)
2
3
4
6 Dancer::Serializer::JSONP - serializer for handling JSONP data
7
9 version 1.3400
10
13 This class is a subclass of Dancer::Serializer::JSON with support for
14 JSONP.
15
16 In order to use this engine, use the template setting:
17
18 serializer: JSONP
19
20 This can be done in your config.yml file or directly in your app code
21 with the set keyword. This serializer will not be used when the
22 serializer is set to mutable.
23
24 All configuration options mentioned in Dancer::Serializer::JSON apply
25 here, too.
26
28 serialize
29 Serialize a data structure to a JSON structure with surrounding
30 javascript callback method. The name of the callback method is obtained
31 from the request parameter callback.
32
33 deserialize
34 See Dancer::Serializer::JSON#deserialize.
35
36 content_type
37 Return 'application/javascript'
38
40 Dancer::Plugin::CORS is a modern alternative to JSONP, but with limited
41 browser support. Today, JSONP can be a serious fallback solution when
42 CORS is not supported by a browser.
43
45 David Zurborg, "<zurborg at cpan.org>"
46
48 Dancer Core Developers
49
51 This software is copyright (c) 2010 by Alexis Sukrieh.
52
53 This is free software; you can redistribute it and/or modify it under
54 the same terms as the Perl 5 programming language system itself.
55
56
57
58perl v5.28.0 2018-06-15 Dancer::Serializer::JSONP(3)