From: gmungoc Date: Mon, 22 May 2017 13:13:23 +0000 (+0100) Subject: JAL-2543 identify as JSON before HTML X-Git-Tag: Release_2_10_3b1~253 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e4fe46502d641a228ee4877d2a5a8443eb75f189;p=jalview.git JAL-2543 identify as JSON before HTML --- diff --git a/src/jalview/io/IdentifyFile.java b/src/jalview/io/IdentifyFile.java index 035c1fa..be0df21 100755 --- a/src/jalview/io/IdentifyFile.java +++ b/src/jalview/io/IdentifyFile.java @@ -274,6 +274,11 @@ public class IdentifyFile // read as a FASTA (probably) break; } + if (data.indexOf("{\"") > -1) + { + reply = FileFormat.Json; + break; + } int lessThan = data.indexOf("<"); if ((lessThan > -1)) // possible Markup Language data i.e HTML, // RNAML, XML @@ -291,11 +296,6 @@ public class IdentifyFile } } - if (data.indexOf("{\"") > -1) - { - reply = FileFormat.Json; - break; - } if ((data.length() < 1) || (data.indexOf("#") == 0)) { lineswereskipped = true;