SVG to JSON on server side?

725 views
Skip to first unread message

Mujtaba Haider

unread,
Mar 21, 2012, 1:43:42 AM3/21/12
to svg...@googlegroups.com

Our web application is storing SVG files on server, we want to get JSON outputs from SVG files on server side. I've looked into PETESAIA's SVG to JSON php program. But the output i am getting is null or an empty array.

<?php
require_once
PeachSVG.php”;
$filename
= filename-2012-03-06.svg”;
$json
= PeachSVG::convert($filename, $to_json = true);
//$json = convert($filename, $to_json = true);   //also used this one
var_dump
(json_decode($json, true));
?>

This php code, PeachSVG.php and the svg file are in the same directory.

Can anyone suggest where i am wrong going with this?

Or any alternative of SVG to JSON on server side

Camilo Kawerín

unread,
Mar 22, 2012, 3:47:07 PM3/22/12
to svg...@googlegroups.com
Hi,

I think that any PHP converter from XML to JSON will help you.

--
You received this message because you are subscribed to the Google Groups "SVG Web" group.
To view this discussion on the web visit https://groups.google.com/d/msg/svg-web/-/d5utw5xU3cYJ.
To post to this group, send email to svg...@googlegroups.com.
To unsubscribe from this group, send email to svg-web+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/svg-web?hl=en.



--
Camilo Kawerín
kawerin.com.ar

Reply all
Reply to author
Forward
0 new messages